hi i need help to arrange a 2d vector data combination . i don't know how to ask this . in the code below i created a small version of what i want but when the vector get bigger what i do i can't think an other way
Code:#include <iostream> #include <vector> #include<string> using namespace std; int main() { vector<vector<string>> Data; vector<string> a; Data.push_back(a); Data.push_back(a); Data.push_back(a); Data[0].push_back("0af5d24d"); Data[0].push_back("45f2r"); Data[0].push_back("245gd"); Data[0].push_back("0"); Data[0].push_back("02"); Data[1].push_back("df5"); Data[1].push_back("0"); Data[1].push_back("245s1"); Data[2].push_back("754g5h"); Data[2].push_back("f2g1fg45f5"); Data[2].push_back("125"); Data[2].push_back("24415"); for (int i = 0; i < Data[0].size(); i++) { for (int j = 0; j < Data[1].size(); j++) { for (int k = 0; k < Data[2].size(); k++) { cout << Data[0][i] << Data[0][j] << Data[0][k] << endl; // add all 3 vector data into a 1d char array } } } return 0; }




