I am getting the following debugging error:
Debug Assertion Failed!
Program: Path\To\vc\include\xtree
Line: 237
Expression: map/set iterator not dereferencable
whith these lines of code:
for(std::map<int,IO::ctcolor>::iterator it = IO::colorTable.begin(); it != IO::colorTable.end();) {
//left out some code here, but even without it doesn't work
cout << "dummy"; //gets printed multiple times while iterating, so the map is not empty
++it;
}
The for loop iterates through all elements of IO::colorTable
but doesn't stop when reaching the end, I can see this when printing data to the console inside the loop.
Edit: I just noticed that the error occurs in the line after the for loop where I mistakenly tried to access it