::> I want to define two classes like the following:
/* you need a forward declaration of class B */
class B;
::> class A
::> {
::> A(int a) { };
::> B func1() { return B(1); };
::> }
::> class B
::> {
::> B(int a) { };
::> A func2() { return A(1); };
::> }
::> two classes which each contains a function which return a instance of the
::> class. I get a "typename expected"-error in class A. I believe I have to
::> the "typename" keyword, but I can't get it to work.
Add the forward declaration before class A, so that it knows there *is* a
class B...
# Herbert Bushong harchon@centuryinter.net [TEAM OS/2]
- Blackbeard's BBS Intelec: 239:600/0
+ Fido: 1:19/19 http://www.intelec.com/software/
---
RM 1.31 2508 Taglines are like cats. You just THINK they're yours.
---------------
* Origin: Blackbeard's BBS - Ville Platte, LA - 318-468-3385 (1:19/19)
|