[comp.lang.c++] A question with Zortech C++

adrian@zap.sw.mcc.com (Adrian Lao) (06/04/90)

I have a question about Zortech C++.

I have code similar to the following one:

class AObj {
   protected:
	BObj * object;

   public:
	AObj(BObj*);
	BObj* Object() {return object;};
};

class BObj {
   ....
   ....
   public:
	BObj();
	Print();
};


somewhere in souce code, I have the following in which the Zortech C++ is
complaining "Syntax error: not a struct or union type".

..........
.......
BObj * bobj = new BObj();
.....
AObj * aobj = new AObj(bobj);
.......
aobj->Object()->Print();
                    ^
		    not a struct or union type

So, is this not a feature in C++2.0, or just the Zortech C++ didn't support it?
Cos' I got no problem in compiling with Glockenspiel C++ or GNU g++.

Adrian
adrian@mcc.com