Been trying to find out why I can't seem to get 2d vectors to work properly. Tried this and it only works if I initiliaze the vector of vectors as a local variable. Otherwise I get an out of range error.
vector <string> allSymbols;
std::vector<std::vector<bool>> wholeMap(allSymbols.size(), std::vector<bool>(allTerms.size() + 2));
void fillWholeMap()
{
cout << allSymbols.size() << endl;
cout << allTerms.size() << endl;
for (int i = 0; i < allSymbols.size(); i++)
{
for (int j = 0; j < allTerms.size() + 2; j++)
{
wholeMap[i][j]=false;
}
}
}