Cross Platform Support for sprintf's Format '-Flag
问题 The Single UNIX Specification Version 2 specifies the sprintf 's format ' -flag behavior as: The integer portion of the result of a decimal conversion ( %i , %d , %u , %f , %g or %G ) will be formatted with thousands' grouping characters [1] I can't find the format ' -flag in the c or the c++ specifications. g++ even warns: ISO C++11 does not support the ' printf flag The flag is not recognized to even warn about in Visual C; printf("%'d", foo) outputs: 'd I'd like to be able to write C