diff --git a/cplusplus/p0004.cpp b/cplusplus/p0004.cpp index e5714582..ff691c38 100644 --- a/cplusplus/p0004.cpp +++ b/cplusplus/p0004.cpp @@ -22,6 +22,8 @@ unsigned int p0004() { for (j = 100; j < 1000; j++) { prod = i * j; char buf[8] = {}; + // I know snprintf exists, but it isn't defined in C++98, + // and this isn't taking in user input sprintf(buf, "%u", prod); std::string forward(buf); std::string reverse = forward; diff --git a/cplusplus/p0034.cpp b/cplusplus/p0034.cpp index 8ef6a460..be5df5d7 100644 --- a/cplusplus/p0034.cpp +++ b/cplusplus/p0034.cpp @@ -21,6 +21,8 @@ unsigned long long p0034() { for (unsigned long i = 10; i < 100000; i++) { sum = 0; char buf[8] = {}; + // I know snprintf exists, but it isn't defined in C++98, + // and this isn't taking in user input sprintf(buf, "%lu", i); for (unsigned char j = 0; j < 8; j++) { if (!buf[j]) break;