Yes having a cold or flu virus can cause shortness of breath.
When you have a cold or flu it's harder for you to breathe so if you try to do anything strenuous then you might get out of breath sooner.
The cold and flu virus can cause inflammation of the airways that bring air to and from the lungs which can make it more difficult to breathe.
It's usually nothing to worry about when you get shortness of breath with the flu or cold but if you are having a really hard time of breathing then see a doctor or call 911.
But if it's just shortness of breath when doing something then it's likely just the cold or flu causing the shortness of breath.
It happens to me every time I get the cold or flu.