Advertisement
Reeyoo

c++ help

Apr 11th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. Relevant code:
  2. void LogFormatter::debug() {
  3.     cout << contents.Get_postByIndex(13).Get_lines(0) << endl; // outputs "..."
  4.  
  5.     contents.Get_postByIndex(13).delLine(0);
  6.  
  7.     cout << contents.Get_postByIndex(13).Get_lines(0) << endl; // outputs "..."
  8. }
  9.  
  10. void Post::delLine(int which) {
  11.     cout << lines[which] << endl; // outputs "..."
  12.     lines.erase(lines.begin() + which);
  13.     cout << lines[which] << endl; // outputs "((sorry, got distracted))"
  14. }
  15.  
  16. Output:
  17.  
  18. ...
  19. ...
  20. ((sorry, got distracted))
  21. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement