Untitled
unknown
plain_text
2 years ago
441 B
10
Indexable
#include <iostream> #include "StaticList.h" using namespace std; int main() { StaticList MyList; if (MyList.empty()) { cout << "List is empty" << endl; } else { cout << "List has elements" << endl; } int x = 2; for (int i = 0; i < 5; i++) { MyList.insert(x, i); x += 2; } MyList.display(cout); cout << endl; MyList.erase(2); MyList.display(cout); }
Editor is loading...