Handmade Hero»Forums»Code
jacob
3 posts
why wont this code work
#include <Windows.h>
int CALLBACK WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
);
{
}

void foo(void)
{
}
Mārtiņš Možeiko
2559 posts / 2 projects
why wont this code work
You should always post exact error message you are getting. Making other people to guess your error is not nice.

The provlem with your code is that you have semicolon at end of WinMain function declaration. And compiler doesn't expect function body after that. Don't put semicolon there if you want to actually define the function.
Piotr Madalinski
9 posts
why wont this code work
First of all, remove the semicolon in-between the function signature and the body, secondly - it does not work, because you put no code in the functions, so it has nothing to do.