Skip to content

Exercise 13.37 #197

Description

@heturing

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);}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions