Your symptoms of trouble breathing could be caused by a few different problems. The first question I would have for you is how in shape are you currently? If it has been six months since you have exercised and then all of a sudden you decide to sprint in gym class, you are likely to be very short of breath. The fact that you experienced this when it was cold out suggests that you may have experienced some exercise induced asthma
. This is a common problem where the bronchioles (tubes that carry air to the lungs) constrict making it hard to get air in and out. Other problems such as heart disease and other types of lung disease are common causes of shortness of breath, but probably not in young people such as yourself (I am assuming you are still in school).
The way to work this problem out is to first schedule an appointment with your primary care physician
. He or she can listen to your lungs to see if you have any wheezes which can be a sign of asthma. If exercise-induced asthma is suspected, then you may need some lung tests done while you are exercising. Treatment will be an inhaler that you take just before you exercise.