A residual cough from an infection can hang on for weeks.
If you have drainage in throat, try taking Mucinex to help thin the mucous.
If you have a dry cough, I find tht Halls Cough Drops work well.
Many times it takes a long time for the irritation to go away.