Having dry and irritating cough
one gets this type of pain due tostrain on chest muscles.
You may require evaluation of your case.
Go for x-ray chest and complete blood checking to know the nature of chest infection
Consult your doctor and get examined.
After examination plan of treatment can be decided.
In simple viral or lower respiratory tract
infection one can get this type of coughing as well.
Ok and take care.