I found a strange phenomenon when using the STL functions.
I wrote a test() function.
bool test()
{
list<int> t;
for( int i = 0; i < t.size()-1; i ++ )
{
return false;
}
return true;
}
when I run the test() function, return false; why?
size() return a size_t value, i.e. unsigned int, therefore size()-1 is positive.