I have an array of vectors but for some reason i can't iterate through the arrays of vectors. It rather gave me such long error message.
int num = 6;
vector<string> vArray[num];
for (int i = 0; i < 50; i++)
{
vArray[i % num].insert(vArray[i].begin(), data);
} //runs fine
for (int i = 0; i < num; i++)
{
for(std::vector<int>::iterator it = vArray[i].begin(); it != vArray[i].end(); it++)
{
cout << *it << endl;
}
}//problem..
and it just gives me this super long error message
p2.cpp:94: error: conversion from ‘__gnu_cxx::__normal_iterator, std::allocator >*, std::vector, std::allocator >, std::allocator, std::allocator > > > >’ to non-scalar type ‘__gnu_cxx::__normal_iterator > >’ requested
p2.cpp:94: error: no match for ‘operator!=’ in ‘it != vArray[i].std::vector<_Tp, _Alloc>::end with _Tp = std::basic_string, std::allocator >, _Alloc = std::allocator, std::allocator > >’