I can only agree with the comments of Buenchico but only to add:
You can have two respiratory viral infections following each other so as to make the "cold" and cough persist for up to a month and often longer.
How does one know that a viral infection has "turned" into a bacterial infection.?
You sputum (phlegm) will turn green or yellow indicating (usually) the onset of an infection which "may" need antibiotics.
My advice:
If your phlegm is not coloured, then 3 weeks is not a long time to have a cough.
If your phlegm is coloured, go and see your GP as he may, but not necessarily prescribe antibiotics.
If you phlegm is coloured, but you feel well, then give it another week or ten days.