Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "Vector.h"
- using namespace std;
- int main()
- {
- Vector<int> intVector;
- cout << "Calling intVector.isEmpty()..." << endl << intVector.isEmpty() << endl << endl;
- cout << "Calling intVector.isFull()..." << endl << intVector.isFull()<< endl << endl;
- cout << "Calling intVector.getSize()..." << endl << intVector.getSize()<< endl << endl;
- for (int loop = 0; loop < 10; loop++)
- {
- intVector.push_back(loop * loop);
- }
- intVector.pop_back();
- cout << "Calling intVector.at(5)..." << endl << intVector.at(5) << endl << endl;
- Vector<float> floatVector;
- cout << "Calling floatVector.isEmpty()..." << endl << floatVector.isEmpty() << endl << endl;
- cout << "Calling floatVector.isFull()..." << endl << floatVector.isFull() << endl << endl;
- cout << "Calling floatVector.getSize()..." << endl << floatVector.getSize() << endl << endl;
- for (float loop = 0; loop < 10; loop++)
- {
- floatVector.push_back(0.35 + loop);
- }
- floatVector.pop_back();
- floatVector.pop_back();
- cout << "The contents of floatVector is: \n\n";
- floatVector.print();
- cout << "Calling floatVector.getSize()..." << endl << floatVector.getSize();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement