I'll google vectors to see what i can come up with, i dont know about vectors, maybe im in too deep
You can use vectors just like arrays--except they have no fixed size. The basics are very easy to learn. Here's some of the basics using ints as the elements of the vector:
Code:
#include <iostream>
#include <vector> /***/
using namespace std;
int main()
{
vector<int> numbers(3); //declare a vector of ints with size 3
numbers[0] = 10;
numbers[1] = 20;
cout<<numbers.size()<<endl; //3
numbers[2] = 30;
for(int i = 0; i<3; i++)
{
cout<<numbers[i]<<endl;
}
numbers.push_back(40); //used to expand the size of the vector
cout<<numbers[3]<<endl;
cout<<numbers.size()<<endl; //4
cout<<numbers.capacity()<<endl; //6
return 0;
}
push_back() :
Adds the argument to the end of the vector, expands the vector if necessary.
size() :
If you declare the size of a vector, size() will return that number--even if there are fewer elements. Otherwise, size() will return the actual number of elements in the vector.
capacity():
Internally, it is inefficient to expand a vector's size by just 1 every time, so a vector automatically expands its size to something bigger. capacity() gives you the room available before the vector will have to be resized again.
I don't think you'll need anything more than that to write your program.