Chapter 3. The String Formatters of Manor Farm, Part 2: Standard (or Blindingly Elegant) Alternatives
Our Orwellian look at the mysteries of
sprintf concludes with a comparative analysis of
std::strstream, and the nonstandard but blindingly elegant
Alternative #1: snprintf
For each of the following alternatives to
sprintf, compare and contrast its strengths and weaknesses, using the analysis and example code from Item 2:
Of the other choices,
Get Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.