Original Post
Hello, everyone^^ I am implementing my graphic program and it seems to have a serious bug with C++ STL vector. I declared a vector ActiveVertexList in a class and I am sure that it has been properly initialized. But when the program runs to a function's "return" expression, the data in ActiveVertexList are modified.......and it seems logically impossible!! The codes are like this: #include //some other include files static MyClass Mesh; //the ActiveVertexList is //MyClass's data member ... .... ..... HRESULT CALLBACK Function() { //Do something Mesh.init(); //Data are all right in this section //hr is HRESULT type return hr; //<= after this expression ,The data in //Mesh.ActiveVertexList are impossibly //Modified.......I can't figure out WHY..... } I have traced the code by VS.net 2003,and I am sure that the data are right before return expression. May this a bug of STL vector?? May someone give me a hand? I'll appreciate it very much^^ THX.