So i am doing this what i am going to talk about quite..always. When i do exercises in books or write any type of programs, games mostly. I write that code in my head but i do it visually. I think about '#include <iostream>' then I "compile it in my head". While "compiling it in head" i do from first code i wrote in head and what does that thing do then i check if it works. And viola it works! Well i want to ask if anything bad could happen while doing this? I really love writing it in head then on paper and then on 'Microsoft Visual C++ Express 2010'.
There's nothing wrong with it, but it's a waste of your time. The machine can compile far more accurately and faster than you can in your head. Your head is for solving the actual problem.
I'm guessing by "compile" you actually mean "run"/"debug", as in work out an example in your head/on paper? If so, that's very useful. It's the only way to check for logical errors.
If by "compile" you actually mean "translate to machine-executable code", then please go here before posting again: http://www.captcha.net/
Being able to spot compiler errors before compiling can be useful, this is true. But it will come naturally with time. It's not worth taking extra time to pour over code checking for syntax mistakes when you can press a button and have the computer instantly show you all your mistakes.
Logic mistakes are another issue, of course, as a compile won't catch those. But chasing down logic mistakes before you even have a compiled program is somewhat pointless.
Hand writing code with pen & paper also seems like an incredible waste of time.
I sometimes write code on paper, that is.. if I am on the bus or walking somewhere. But as others have said, writing code on paper is pointless if you have a computer available
What exactly is the point of your post? To be congratulated about your compiling? If you only want to actually train your brain I think there are far better ways. But if you please this way that will do. Only take care as not to solve the same difficulty problems again and again. Move on to compile new programs!