Given that you want to read a character at a time into a string, and you know that you need to read at least 100 characters, how might you improve the performance of your program
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:9| Question number:42
All Answers
total answers (1)
We can call
need an explanation for this answer? contact us directly to get an explanation for this answer`s.reserve(100)`
to preallocate the space for the string`s`
.