prasadi: Vectors don't grow automatically. If the vector is size 4 and you access element 4, the vector will throw an exception. Actually, right now I can't remember if it was the vector that throws the exception or some other lower code, but it makes more sense that vector throws it.
operator[] does not throw but the at member function does. With regards to the OP, some code needs to be posted for us to provide any insight. I would take it a step further and say that the string is definitely not the cause of the crash. It will be the user of the string that is faulty.