
please wait
|
|
timeText.str( "" );
timeText << "Milliseconds since start time " << SDL_GetTicks() - startTime;
"Milliseconds since start time"
into the stringstream, and then it inserts SDL_GetTicks() - startTime
into it. You should be familiar with iostreams (std::cin, std::cout, etc). They are similar to stringstreams in that you insert/extract the content you want using operator<< (or operator>>), however a stringstream simply stores the value for usage, unlike std::cout, which displays the output.