+ 1
Width vs Precision.
Can someone please explain to me the difference between width and precision in his/her own terms. Appreciated.
1 Resposta
+ 1
Are you referring to the format in printf function? If so, width is the minimal number of characters to be printed, while precision is the is the number of digits to be printed after the decimal point. You can refer to http://www.cplusplus.com/reference/cstdio/printf/