Well I took an interest in your problem... you could always treat it like a matrix.
Code:
typedef std::vector<char> charArray;
typedef std::vector<charArray> charMatrix;
for (charMatrix::size_type i = 0; i < foo.size (); i++) {
std::cout << "foo[" << i <<"] is ( ";
for (charArray::size_type j = 0; j < foo[i].size (); j++) {
std::cout << foo[i][j] << ", ";
}
std::cout << ").\n";
}
But I read that you wanted something different.
Flattening is still possible, like I said, make a copy of the first vector in the vector, and then append the rest of the vectors in the vector to that, using insert.
So keep it in mind.