[comp.lang.c++] function returning a pointer to class

lba@kolvi.hut.fi (Laszlo C Balint) (12/04/90)

I am porting a program from (I think) g++ to MS-DOS (in this case Turbo C++).
There is a piece of code, which causes some trouble:

	...
	class foo;
	...
	foo* func(operand1);
	...

produces the error message:

	Undefined symbol operand1

If I rewrite it to:

	...
	void* func(operand1);
	...

no problems while compiling.

It is told to work in g++.

Is the code unportable, am I missing something, or does the Turbo C++ have its
own personality?

Thanks in advance,

Laszlo

--
Laszlo C. Balint        (a Hungarian in Finland)        lba@kolvi.hut.fi

      Helsinki University of Technology, Communications Laboratory
 Otakaari 5 A, SF-02150 ESPOO, Finland; Tel.: +358 0 4512352 or 4512350