There is actually 2 problems. First, vector (and all the STL containers) store copies of objects. This isn't a problem unless something is done to the vector (e.g. sort it) and the object that you were referencing is now moved to another location in the vector. Thus, the memory your reference is now looking at contains different data than what you thought you were operating on. Second, if the vector has to be resized to accomidate your additions, the memory location that obj is at may no longer be allocated for that object, so you would be accessing invalid memory (or possibly accessing memory that is now allocated for something else).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac