Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <sstream>
- using namespace std;
- class List {
- private:
- int numItems;
- int *array;
- public:
- List(int n = 20) {
- numItems = n;
- array = new int [numItems];
- }
- }
- ;
- int main()
- {
- //finding heap and stack from:
- List myList;
- //or List lists[5];
- //or List *special = new List(10);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement