Guest User

Untitled

a guest
Aug 21st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. for(i = 0; i < numberOfObjects; i++) {
  2. cout << "[Entering new object]: is this a book (b) or a tape (t)? ";
  3. cin >> answer;
  4. cin.ignore();
  5. switch (answer) {
  6. case 'b':
  7. pubArray[i] = new book;
  8. pubArray[i]->getdata();
  9. break;
  10. case 't':
  11. pubArray[i] = new tape;
  12. pubArray[i]->getdata();
  13. break;
  14. }
  15. }
Add Comment
Please, Sign In to add comment