vector<sStruct> *addElement(vector<sStruct> *vAddElement) {
myStruct sAddElement;
// ...
vector<sStruct> vectorAddress; // creates a new *vector* on the stack
vAddElement = &vectorAddress; // makes vAddElement point to the new vector
// but does *not* effect the vector whose
// address you passed
// ...
vectorAddress.push_back( sAddElement ); // adds an element to the new vector
cout << vectorAddress.size() << endl; // it's size will always be 1,
// since you just added the first element
(*vAddElement) = vectorAddress; // does absolutely nothing, you are assigning
// the new vector to itself
return vAddElement; // erroneously returns a pointer to the new vector
// it was allocated on the stack and no longer exists
// after the return, **never do that **
}