If you feel able to, then your cold can't be that bad and I shouldn't think it'd do you much harm. If you feel too ill to excercise, then listen to your body and rest.
DO NOT EXERCISE WITH A VIRAL INFECTION. there is a real chance of death from only a mild infection due to viral myocarditis, and you will do yourself no favours. a brisk walk is the absolute tops, as this will help the immune system but anything involving an aerobic workout is just plain dangerous.
When you have an infection your body is trying to fight it, when you excerise it puts added pressure on your body and your heart. When you hear that really fit people have died from a heart attack its sometimes because they have excersied when they are ill. Not trying to scare you but you should give yourself a break for a few days and get some vitamin C down your neck!
by exercising you are raising your heart beat and body temperature which in turn puts more pressure on the circulatory system moving germs and infections around your body which can increase the problem. Also as you sweat and breathe heavily your spreading your germs around your gym and subjecting everyone else to your illness... so no don't exercise when your ill, it won't help you and it won't make you popular at the gym !