[Solved] Can we put vector to the list in C++ ?


If your compiler is up to date with the standard:

std::list<std::vector<std::string>> lst;
for ( auto& vec : lst ) // Iterate through all std::vector's
   for ( auto& str : vec ) // Iterate through all std::string's
       std::cout << str << std::endl; // str is your std::string

0

solved Can we put vector to the list in C++ ?