I have a vector full of vectors, and whenever I try to access them I get a segmentation fault. It compiled fine, but then when I ran it I got a error. So I ran a debuger and it said a had a segmentation fault. here is the code:
Please help.
Code:
vector< vector<string> > questions;
//some other code where I add things to the vector
for (int i=0; i < questions.size(); i+=1){
for (int k=0; k < questions[i].size(); k+=1){
cout << questions[i][k];
}
}
Comment