Original Post
ok its probably a silly silly question but ive spent the last few hours trying to solve it ill try to illustrate this as easily as possible to make it clear: ive got a program with a window.cpp and a window.h to handle the win32 stuff, and main.cpp with the init(), think(), render() and shutdown() functions. all the modules (scripts, models, files etc) have their own header files with the classes and their member functions/variables, and *.cpp files to go with each header file containing the bodies of the functions. all the header files link to one standalone header with all the windows, opengl, string and other microsoft header files (common.h) ----------- Application ----------- window.cpp window.h main.cpp = COMMON.H = #if !defined H_COMMON #include #include "model.h" #endif = MODEL.H = class cModel { public: void Draw(); private: char name[256]; }; --------------------------- Generic Module = HEADER FILE = (example.h) --------------------------- #include "common.h" class cExample { public: void function(); cModel Model; <-------- error generated here private: int variable; }; ----------------------------- = SOURCE FILE = (example.cpp) ----------------------------- #include "example.h" void cExample::function() { variable = 1; }; ----------------------------- this generates C2079 - 'Model' uses undefined class 'cModel' ive tried putting the classes in the source file then just putting "class cModel" in the header file MODEL.H, and ive definatly included ALL the right files; i also get the same problem when i try to test the example class in MAIN.CPP, i can even declare the class exists right before declaring a class (if you get my drift) and it doesnt work? (in example.cpp) class cExample; cExample test; this generates - error C2079: 'test' uses undefined class 'cExample' Help!!!!! ta much - pez