I'm programming a bit again. However I'm running into problems with the order in which classes are declared.
I have 1 class which is called "Mask" and another "Origin". These cause some problems, the "Mask" constructor takes an origin which causes the following compile error:
Quote:error C2079: 'Mask::orig' uses undefined class 'Origin'
My headers look like:
mask.h
#include <vector>class Mask {...};
generic.h
class Mask;class Origin;#include "mask.h"class Origin{...};
I know that this bug happens because "Mask" is created before "Origin" is. However can I prevent this bug from happening? (Other than by making sure Origin's code is above Mask's?) - I tried to do this by putting the line "class Origin;" before the include, but that didn't help?
[Edited by - paul23 on November 10, 2010 1:37:59 PM]