-
map pass by refrence?
Can I pass a map by refrence to a function
ie:
Code:
MainMenu::MainMenu(std::map<string,Book> rlibrary &){
ptrLibrary=rlibrary;
while(Menu::get_option()!=6){
while (!(validate_option(Menu::get_option()))){
display_menu();
Menu::set_option(Menu::input_option());
}
process_option(Menu::get_option());
}
}
-
Yes, but you've used the wrong syntax. This is correct:
Code:
MainMenu::MainMenu(std::map<string,Book> & rlibrary){
-
Thanks this programming is definitly a learning experience.