Original Post
Hello! Could anyone refresh my memory about the stl trickery involved in reading from a stream (actually std::ifstream) to a std::vector. I want to read an amount of chars known only at runtime. I tryed : myVector.reserve(charCount); myStream.read(&myVector[0], sizeof(char)*charCount); But then operator [0] throws an out of range exception.