Hi everyone. I have this class...
and I need the constructor of this ApplicationType to set up all my buttons. The buttons' constructors look like this:Code:class ApplicationType { private: vUIButton Buttons[5]; public: ApplicationType(); ... };
(So normally I would make a button by saying "vUIButton ExitButton( "Exit", NULL );".)Code:vUIButton( char* Text, RectangleType* Area )
How do I do this with an array? I want the buttons to be like this:
1. "New", NULL
2. "Load", NULL
3. "Options", NULL
4. "Credits", NULL
5. "Exit", NULL
I know that i could do it like this...
...but this won't work in the constructor.Code:vUIButton Buttons = { vUIButton( "New", NULL ), vUIButton( "Load", NULL ), vUIButton( "Options", NULL ), vUIButton( "Credits", NULL ), vUIButton( "Exit", NULL ) };
How do I use an array's objects' constructors in the constructor of the class that contains them? (Wow, that was a weird sentence...)
Thank you very much for your time. It is greatly appreciated!



LinkBack URL
About LinkBacks


