Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "LinkedList.h"
- int main()
- {
- LinkedList<int> list(14);
- for (int i = 0; i < 10; i++) {
- try {
- list[i] = i;
- }
- catch (std::out_of_range){}
- printf("%i \t", list[i]);
- }
- std::cout << std::endl;
- LinkedList<int> list2(list);
- list2[4] = 12;
- list[4] = 3;
- for (int i = 0; i < 10; i++) {
- printf("%i \t", list2[i]);
- }
- std::cout << std::endl;
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment