Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(i = 0; i < numberOfObjects; i++) {
- cout << "[Entering new object]: is this a book (b) or a tape (t)? ";
- cin >> answer;
- cin.ignore();
- switch (answer) {
- case 'b':
- pubArray[i] = new book;
- pubArray[i]->getdata();
- break;
- case 't':
- pubArray[i] = new tape;
- pubArray[i]->getdata();
- break;
- }
- }
Add Comment
Please, Sign In to add comment