Advertisement
noobdoob

Untitled

Apr 27th, 2021
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <sstream>
  4.  
  5. using namespace std;
  6.  
  7.  
  8. class List {
  9. private:
  10. int numItems;
  11. int *array;
  12.  
  13. public:
  14. List(int n = 20) {
  15. numItems = n;
  16. array = new int [numItems];
  17. }
  18.  
  19. }
  20. ;
  21. int main()
  22. {
  23. //finding heap and stack from:
  24.  
  25. List myList;
  26.  
  27. //or List lists[5];
  28.  
  29. //or List *special = new List(10);
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement