I am trying to start following the tutorials from the start, I installed visual studio community 2015, I had to install visual C library to get started, I choose a universal windows template, I am running the exact code as the intro to C tutorial says, but I got 2 errors
1 2 | expected a declaration Error C2447 '{': missing function header (old-style formal list?) |
this is the code I wrote
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <windows.h> #include <pch.h> void foo(void) { OutputDebugStringA("This is a test.\n"); } int CALLBACK WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow); { foo(); } |
any clue on where I might be going wrong here? thanks
Edit: nevermind, I think I found the culprit, that semicolon after the WinMain .