#include <iostream>
#include <vector>
#include <string>

typedef std::string String;
typedef std::vector<String> StringVector;

class StringVectorWrapper {
    StringVector vector;
public:    
    operator StringVector&() {
        return vector;        
    }
    
    StringVectorWrapper& operator << (const String& str) {
        vector.push_back(str);
        return *this;
    }
};

void printVector(const StringVector& vector) {
    for(StringVector::const_iterator it = vector.begin(); it != vector.end(); it++)
        std::cout << *it << std::endl;
}

int main(void) {
    
    StringVectorWrapper w;
    w << "A" << "B";    
    printVector(w);
    
    printVector(StringVectorWrapper() << "Z" << "W");
    
    
    return 0;
}