Toon posts:

[vc++] beginner: wat doe ik fout.....

Pagina: 1
Acties:

Verwijderd

Topicstarter
d:\cpp projects\notes\winclass.cpp(17) : fatal error C1010: unexpected end of file while looking for precompiled header directive


winclass.cpp:

#include "WinClass.h"


WinClass::WinClass (WNDPROC wndProc, char const * className, HINSTANCE hInst)
{
_class.style = 0;
_class.lpfnWndProc = wndProc;
_class.cbClsExtra = 0;
_class.cbWndExtra = 0;
_class.hInstance = hInst;
_class.hIcon = 0;
_class.hCursor = ::LoadCursor (0, IDC_ARROW);
_class.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
_class.lpszMenuName = 0;
_class.lpszClassName = className;
}


WinClass.h:

#include <iostream.h>
#include <windows.h>

class WinClass
{
public:
WinClass (WNDPROC wndProc, char const * className, HINSTANCE hInst);
void Register ()
{
::RegisterClass (&_class);
}
private:
WNDCLASS _class;
};





zoals ik al zei in het topic ben ik een beginner maar ik snap de fout dus ff niet....

alvast bedankt..
Dennis

  • ^Mo^
  • Registratie: Januari 2001
  • Laatst online: 04-11-2025
je gebruikt precompiled headers, je moet in de cpp file als eerste "StdAfx.h" included... of welke precompiled header file je ook gebruikt

"There are 10 kinds of people in the world, those who understand binary and those who don't" | Werkbak specs