One thing I've never got my head around is multiple file projects. For example:
Code:// myclass.h class myClass { public: myClass (void); private: int x; };Code:// myclass.cpp myClass::myClass (void) { x = 0; }I cannot get a simple project like this to execute. I am using MSVC 6.0 and I add myclass.cpp to the Source Files folder but the class cannot be seen properly - I get errors such as "myclass.cpp: myClass is not a class".Code:// mymain.cpp #include <iostream.h> #include "myclass.h" int main (void) { myClass m; }
There is no "Cannot find 'myclass.h'" error so the header file can be seen but it seems like it's just being ignored.
How do you put a simple multi-file project together?



LinkBack URL
About LinkBacks


