Thanks for writing in.
It seems to be a simple muscular cramp / fatigue probably after prolonged dry cough
from flu. Muscle cramps
can hurt you while coughing/ sneezing
It can be costo-chondritis
also, but needs a physical examination by your doctor.
If you are not having any phlegm while coughing (means dry cough) then you can take some cough suppressants along with few muscle relaxants /NSAID's to relieve your pain.
Usually it is a self limiting problem & will subside within a week. If the problem persists have a chest Xray done after consulting your doctor.
Get well soon,