I am getting the following error:Code:prototypes: void edit_book(map<string,Book> *); map<string,Book> *get_ptrLibrary() const {return ptrLibrary;}; call to function: error here edit_book(get_ptrLibrary());
editmenu.cpp:46: passing `const EditMenu' as `this' argument of `void
EditMenu::edit_book(std::map<std::string, Book, std::less<std::string>,
std::allocator<std::pair<const std::string, Book> > >*)' discards qualifiers
I think this has to do with my const declaration
I want edit_book(map<string,Book> *) to be able to change the map but get_ptrLibrary() shouldn't alter anything therefore is a const function. What exactly is the problem here?



LinkBack URL
About LinkBacks


