I'm not quite familiar with Visual C++. I was trying to create a basic win32 program. I compiled it but i don't know how to run the output file. If i select start without debugging, it asks me to choose the executable file. But i don't know what to do as no executable file was created. Any ideas???

8 Years
Discussion Span
Last Post by s_sridhar

Your code does in fact have a main( ) function?

And you did add the code file to the project? Look in the Solution Explorer - is your code file shown under the Source Files subfolder?


well, my code is this

# include<windows.h>
int WINAPI WinMain
   (HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdParam, int cmdShow)
    char className [] = "Sridhar";
    WinClassMaker winClass (WinProcedure, className, hInst);
    winClass.Register ();
    WinMaker maker (className, hInst);
    Window win = maker.Create ("Hi everybody!");
    win.Display (cmdShow);

    // Message loop
    MSG  msg;
    int status;
    while ((status = ::GetMessage (& msg, 0, 0, 0)) != 0)
        if (status == -1)
            return -1;
        ::DispatchMessage (& msg);
    return msg.wParam;

and it is among the source files.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.