I want to write one c++ program, compiling and linking .cpp gives .exe file. if i double click on that and execute it a console gets opened and closed. I don\'t want that consol
make sure you define _WINDOWS or WINDOW during compile and linking. (depending on your environment).
_WINDOWS
WINDOW
On the commandline you can do this as follows
cl -D_WINDOWS program.cpp