#include <vector> /* Now to initialise your vector */ std::vector <std::string> myVector; /* Now when you find your MAC Address */ myVector.push_back(array[i]);
If you don't know much about vectors, I recommend looking at the reference here.
If you're forced to use an array, simply create a new array of a defined size or you can malloc/realloc a new array size using the malloc() and realloc() functions respectively to add new elements. You must also create a new variable to hold the index you're up to. A good example of the latter method can be found here.