T
Toke H?iland-J?rgensen
Hello. I am quite new to the c++ language, and am still trying to
learn it. I recently discovered how using include files would allow me
to split up my code into smaller segments, instead of having class
definitions etc. in one big file (yay, major discovery...).
My problem is this:
When I define a class in one include file, and then try to instantiate
it in another, I get compile-time errors saying the type is invalid.
If i move the class definition of the class which instantiates the
other class into the main .cpp-file i get no errors.
How to solve this problem? I would like to have each class in seperate
include files, but still be able to instantiate them inside each
other.
I am using Microsoft Visual C++ 6.0 on Windows XP.
-Toke
learn it. I recently discovered how using include files would allow me
to split up my code into smaller segments, instead of having class
definitions etc. in one big file (yay, major discovery...).
My problem is this:
When I define a class in one include file, and then try to instantiate
it in another, I get compile-time errors saying the type is invalid.
If i move the class definition of the class which instantiates the
other class into the main .cpp-file i get no errors.
How to solve this problem? I would like to have each class in seperate
include files, but still be able to instantiate them inside each
other.
I am using Microsoft Visual C++ 6.0 on Windows XP.
-Toke