and actually because it's a template class you can use any type that has been defined, so pretty much he could've used the way he had itLuX wrote:Vector is really a template class itself so there are some restrictions as to what you can do with it.
Code: Select all
std::vector<Menu&> LMenu;
since probably then he was trying to do something like the pointer code i posted above for the CreateButton function
(well guessing there since he hadn't posted that part of the code before his penultimate post )
correct way to use would've been
Code: Select all
virtual void CreateButton( unsigned int X, unsigned int Y, unsigned int Length, unsigned int Height, Menu menu );
Code: Select all
MainMenu.CreateButton( 0, 0, 100, 50, DXHV );
ToMainMenu.CreateButton( 0, 742, 25, 25, MainMenu );