Is there a more human-readable way for representing big numbers in the source code of an application written in C++ or C?
let\'s for example take the number 2,
For C++1y you can now use single quote(') as a digit separator. Based on N3781: Single-Quotation-Mark as a Digit Separator which has finally been accepted. Both gcc and clang have supported this feature as part of their C++1y implementation.
So the following program (see it live for clang):
#include
int main(){
std::cout << 2'345'879'444'641 << std::endl ;
}
will output:
2345879444641