Ad
  • Default User Avatar

    I've never even heard of snprintf
    But I must admit that the solution is pretty to read.
    Though I must ask about the fifth "%d" in the last part of the string. Why is that there?

  • Default User Avatar

    I was pleasantly surprised to see that the solution I thought would be considered an inefficient "naive" approach seems to be a pretty popular one, since I seem to be unfamiliar with advanced string manipulation/creation in C++.
    Mine is pretty much the same, just with some minor formatting differences