What is "assert", or rather, how can I get rid of an error. When I create a vector of pointers to a class with an int x data element, and then do this:
for(I=antiviral_data.begin();I<antiviral_data.end();I++)
{
if((*I)->x>maxx)
{
antiviral_data.erase(I);
}
}
And run the program, I don't get errors until x is greater than maxx, and I use .erase (), after which I get this error:
Failed to run debug check!
Program: ... My documents \ O.exe File: ... include \ vector Line: 116
Expression: ("This is → _ Has_container ()", 0)
For information on how your program can lead to an approval error, see the Visual C ++ documentation claims.
(Click Retry to debug the application)
[Abort] [Retry] [Ignore]
Also, if I try to use cout:
cout<<(*antiviral_data.begin())->x<<endl;
I get this error:
Failed to run debug check!
:... \O.exe :... include\vector : 98
: deferencable
, , . Visual ++ .
( "", )
[] [Retry] [Ignore]
-, , , ?
: antiviral_data - :
antiviral_data.push_back(new aX1(player.x,player.y,'>'));
.
user98188