Exercise information
Exercise 13.36
Add members to the Message class to insert or remove a given Folder* into folders. These members are analogous to Folder’s addMsg and remMsg operations.
Question or Bug
Current version only add/ remove the folder from the folder list of a message. But it did not add this message to the message list of the folder.
void addFldr(Folder* f) { folders.insert(f); }
void remFldr(Folder* f) { folders.erase(f); }
it should be change to
void addFldr(Folder* f) { folders.insert(f); f.addMsg(this);}
void remFldr(Folder* f) { folders.erase(f); f.addMsg(this);}
Exercise information
Exercise 13.36
Question or Bug
Current version only add/ remove the folder from the folder list of a message. But it did not add this message to the message list of the folder.
it should be change to