this coding i copy from book got many error hope some one can help me solve the error
<code>
#include <iostream.h>
class Inner
{ int data;
public:
char id;
void set (int x){ data= x;}
Inner (int x): data(x) {}
};
class Outer
{ Inner room;
public:
float (total);
Outer (int, char);
void set (int i, char id){
room.set(i); // cannot do room.data = I;
room.id =id;
};
Outer::Outer (int i, char id): room(i)
{room.id = id;}
main( )
{ Outer collect (10, 'A’);
collect.set(10, 'B'); // cannot do collect.room.id ='B'
collect.total = 0.01; // no problem with this
}
</code>