On Thursday 30 September 2004 21:16, Prabu Subroto wrote:
I am still confused. Sorry I am a really beginner in GNU C++. 1. May I make 2 classes in one file?
Yes.
2. header is somewhat like this : "#include <iostream.h>.
In C++, drop .h for system headers -- it's the newer standard. You can still append .h, but gcc will warn you.
I am confused how should the header file of my "menu" class for registering "samba" class in the "menu" class?
Could you give me an example of the header file of my "menu" class please....?
Class "menu" needs "samba", but you define "samba" after "menu". One way is as Paul suggested: class samba {...}; class menu {...}; The other whould be to declare samba first: class samba; class menu {...}; class samba {...};