I have a Visual C++ console application (I am using windows Vista, Visual studio 2008). When executing the program i don't want to see the Console popping up. How do i code this.

I tried simply removing all cout and printf statements but yet this didn't help.

Need help here.

Or much more simple you could create a main win32 project and not define or register a window class:

int __stdcall WInMain (HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR szCmdArg,INT nCmdShow)  {
//code here
   MessageBox (NULL,"Output",NULL,MB_OK); //output stuff
 }

or just hide the window

#include <windows.h>
int main()
{
   HWND hWnd = GetConsoleWindow();
   ShowWindow(hWnd,SW_HIDE);
}