Do you know which line fails?

Did you use GetLastError() to find out why?

>>int makeApp(HWND &hwnd, WNDCLASS wc)

HWND is a HANDLE, which is a VOID pointer. So you do not need the '&' (which...