Advertisement
Ajku

Clone

May 29th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. addQuestion(Question* other) {
  2. data[size++] = other->clone();
  3. }
  4.  
  5. MC::clone() {
  6. return new MC(*this);
  7. }
  8.  
  9. ---------------------------------
  10.  
  11. addQuestion(Question* other) {
  12. other->clone(data[size++]);
  13. }
  14.  
  15. MC:clone(Question*& target) {
  16. target = new MC(*this);
  17. }
  18.  
  19. clone -> virtualna v question
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement