>>786
まったく一からと仮定して下記を試してみてください。

#include <windows.h>
#include <stdio.h>

class WINDOW {
public:
WINDOW();
};

WINDOW window;

WINDOW::WINDOW(){

AllocConsole();
freopen( "CONOUT$", "w", stdout );
freopen( "CONIN$", "r", stdin );
}

int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ){

printf( "hello world\n" );

do {
;
} while ( 1 );

return 0;
}