consider this arrays, e.g.
#include <iostream>
#include <vector>
int main(int argc, char* argv[])
{
std::vector<char> ls(3); ls[0] = 'a'; ls[1] = 'b'; ls[2] = 'c';
std::vector<char> us(3); us[0] = 'A'; us[1] = 'B'; us[2] = 'C';
std::vector<int> ns(3); ns[0] = 1; ns[1] = 2; ns[2] = 3;
std::vector<char>::const_iterator lIt;
std::vector<char>::const_iterator uIt;
std::vector<int>::const_iterator nIt ;
for(lIt = ls.begin(); lIt != ls.end();++lIt)
for(uIt = us.begin();uIt != us.end();++uIt)
for (nIt = ns.begin();nIt != ns.end();++nIt)
std::cout << *lIt << *uIt << *nIt << "\n";
}
it produces every possible combination of three vectors "aA1,...,cC3". now, I want to change it in a way that during the running, program decide number of vectors to go through (one, two, or three) and generate combination of choosen vectors. or simply, it there any way to generate a block of nested loops during the running time?