I agree you can still exercise if you have a cold, just take it easy and listen to your body.

However, PLEASE consider doing something other than going to the gym where you will expose lots of other people to your cold, especially if you are using weight machines or anything else where people will be in contact with stuff you touch. That is the surest way to spread germs.