Hi I'm writing up some code where I have to repeatedly clear a vector in a loop, but for some reason it throws an exception on the second iteration of the loop. The clear method isn't supported by my compiler and using a loop causes the same exception to be thrown. I've also tried to catch the exception but to no avail!
Any help would be greatly appreciated.
vector< vector >
The important code goes as follows-
vector< vector > nxtStates;
.
.
for(..stuff...){
.
.
.
cout<<"1("<
Any help would be greatly appreciated.
vector< vector
The important code goes as follows-
vector< vector
.
.
for(..stuff...){
.
.
.
cout<<"1("<
[Error: Irreparable invalid markup ('<nxtstates.size()<<")\n";>') in entry. Owner must fix manually. Raw contents below.]
Hi I'm writing up some code where I have to repeatedly clear a vector in a loop, but for some reason it throws an exception on the second iteration of the loop. The clear method isn't supported by my compiler and using a loop causes the same exception to be thrown. I've also tried to catch the exception but to no avail!
Any help would be greatly appreciated.
<lj-cut text="code">vector< vector<bool> >
The important code goes as follows-
vector< vector<bool> > nxtStates;
.
.
for(..stuff...){
.
.
.
cout<<"1("<<nxtStates.Size()<<")\n";
nxtStates = vector< vector<bool> >();
cout<<"2\n";
.
.
.
}
the output is as follows before it throws an exception.
1(1)
2
1(1)</lj-cut>
Any help would be greatly appreciated.
<lj-cut text="code">vector< vector<bool> >
The important code goes as follows-
vector< vector<bool> > nxtStates;
.
.
for(..stuff...){
.
.
.
cout<<"1("<<nxtStates.Size()<<")\n";
nxtStates = vector< vector<bool> >();
cout<<"2\n";
.
.
.
}
the output is as follows before it throws an exception.
1(1)
2
1(1)</lj-cut>
