My reproductive endocrinologist was the first to tell me that weight loss is only about 60 to 70% percent "calories in vs. calories out". The rest is hormones, body content, genetics, etc. So, if you eat way more than you put out, yes, you will gain weight. That's how most of us got in the shape we were in. I had a test done to see how many calories my body needs to operate. My body needs at least 1350 calories to breathe, operate, and function. (I had this test done a year and a half after surgery). Due to my activities, I can eat up to 2050 a day and not gain weight. If I ate that many calories everyday, however, I would put on weight. That's just how it is. I eat about 1400 to 1700 on any given day. This Saturday, I am running a half marathon, and will probably end up eating close to the 2000 mark.
Exercise and food go hand in hand. You cannot out-exercise a horrible diet, and you cannot just eat so little without exercise. Well, you could, but you would have no muscle and would kill your metabolism. Everyone's bodies are different. Often, it is the types of food we choose to eat and the exercise one chooses.
You have to do what is best for your body. For me, I do a mix of cardio and weight training. The cardio helps burn fat, but the weights help trim and tone.