at the time class destruction, application error occurs. Seems
the heap was corrupted with the pop_back operation on empty
vector.
the code failed to execute in Visual C++ 6 and 2008. butOr rather, that you've undefined behavior in your code. Garbage
worked fine in DevCPP. I admit that the pop function should
check for empty vector. but still the different behavior
concludes, it's a bug in Microsoft STL Implementation
in, garbage out, as they say. (From a quality of implementation
point of view, of course, the code should crash, at least in
debug mode. Which is what all of my implementations -- Sun CC,
g++ and VC++ -- do, once I fix the errors which prevent it from
compiling.)
--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34