Jane 10 , my DH has also had his prescribed Ramipril changed to another medication due to coughing. He's had a cough for years, due to a bit of scarring on his lung which probably came about by not wearing a protective mask when working in a dusty atmosphere, and that may never improve.
However, if I'd not nagged him to see the GP, he wouldn't have 'happened to mention' in the surgery that he'd been having a 'bit of an achy chest when out walking'.... Triple heart-bypass followed not too long afterwards, and 8 months later he's as fit as a flea (but still has a cough)!