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
If you want to create a console type program with a hidden console, then make this the first line of your main routine:
ShowWindow( GetConsoleWindow(), SW_HIDE );