If your goal is to lose weight, it is better not to eat prior to doing cardio. The body will begin using energy from fat stores after the available blood sugar and carbohydrate reserves are used up. Generally, this occurs around 10 minutes into the workout. Working out also raises the metabolic rate, making the body more efficient in its calorie burning ability.
Immediately after weight training, you want to get a good protein source into your system to aid the muscles in their repair and growth. For two hours after stimulation by resistance training, muscles have an enhanced ability to absorb protein. You will notice greater gains in muscle growth if the muscles are supplied with a protein during this timeframe. Because of the time it takes for any item to empty from the stomach into the intestines before they begin absorption into the bloodstream, it is recommeded that any post workout supplementation or meals be ingested as soon as possible following the workout.