Language
C++
Compiler
gcc 12.1.0
Options
Warnings
Optimization
Don't Use Boost
C++11
-pedantic
#include <cstdio>
#include <cinttypes>
int main(void) {
std::int64_t num = INT64_MAX;
std::printf(R"("name":"%s", "number":"%)" PRId64 R"(")", "david", num);
return 0;
}
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.79.0-gcc-12.1.0/include -std=gnu++2b
"name":"david", "number":"9223372036854775807"
Exit Code:
0