This is completely false. You gain weight [not muscles, but fat] because of bad metabolism and doing nothing. If you stop to eat you'll lose muscles first and at end fat. First you should fix your metabolism by eating alot times, like 5-6 per day but not much also drink alot of water. Next step is - start to move. Even walk if you want, but do something if you're lazy to workout.
Exclude:
fried foods
carbonated drinks
juice [the one from shop, because its mostly water and sugar]
bread [like pizzas etc, but toasted bread is ok for breakfast for example you can't totally exclude bread since there are things only bread contains and no other food]
Drink alot of water meanwhile or after you eat. After that do some exercises or walk. Don't eat and sit. Don't eat before sleep.
Still if you workout hard you can eat whatever you want, the problem if you workout hard is that you expect some results and want to eat calories which adds on your muscles and power like meat [chicken, fish etc], eggs etc not chips or pizza which adds directly on your *** and after you burn them result is zero
Sorry for bad english hope this helps you