Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercise 13.37 #197

Open
heturing opened this issue Jan 31, 2021 · 0 comments
Open

Exercise 13.37 #197

heturing opened this issue Jan 31, 2021 · 0 comments

Comments

@heturing
Copy link

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);}
@heturing heturing changed the title Exercise 13.36 Exercise 13.37 Jan 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant