Mail Archives: djgpp/1997/03/07/02:24:45
> How can I declare two different classes, where each class has a member
> variable of the other class type. My problem is how to get the compiler to
> recognize a variable type before it has been created.
You must have a 'prototype' of the second class (the_owner), i.e. declare,
that this class exist. Put the string that declares the existance of the
second class before declaration the first class:
class the_owner;
>class the_cat
> {
> private:
This ought to solve your problem.
HHTYAY,
Denis Y. Zibarev aka [The Necropolis],
FTP Archive Administrator
<den AT re DOT tsu DOT tomsk DOT su>
=== VISIT US: ftp://re.tsu.tomsk.su ====
---
* "...And he shall journey into the realm of the death, and contest with
the forces therein, into the very gates of despair; but whether he
shall return to the world of light,no man knows..." <re.tsu.tomsk.su>
- Raw text -