I have the following function
std::vector<bool> buildBoolList(node* n)
{
std::vector<bool> boolList;
for(int i = 0; i < n->next.size(); i++)
{
int ival = atoi(n->next[i]->val.c_str());
bool b = !!ival;
boolList.push_back(b);
}
return boolList;
}
However every time I run my code boolList is always returned with a size of 0. I've run the debugger to ensure that atoi is returning a valid numeric and I've also ensured that b becomes the appropriate boolean value, however I can't seem to figure out why boolList is not populated.