have you ever experienced program crashes with push_back() function?
how you solved it?
do you know why it happened or when it can happen.
now in my program it crashes, and i can not realize why....
thanks :)
2) The constructor of the object being copied throws an exception (ie, if you have vector<MyClass>, MyClass's ctor throwing an exception would screw you up if you aren't catching it).
3) Your vector object is bad/corrupt (ie, trying to do somevector->push_back(x); when somevector is a null/bad pointer.
Ok...
push_back() function crash when program read vector from file... if program call push_back() function without loading vector from file all works perfectly...
so if vector is empty, i can add as much elements as i want to the vector by calling same push_back() function, but if in the vector there are some elements already loaded from file, calling same push_back() function making it crash....
very strange, isn't it?
You'll need to write an actual operator >> for your class that loads the class. It basically boils down to you are trying to save pointers without saving what you are pointing to.