Igorzovisk Igorzovisk - 10 months ago 97
C Question

How to separate digits in numeric constants (i.e. 10,000) in C or C++ code

Java allows the digits in a numeric constant to be separated as follows:

int a = 1_000_000;

Does C or C++ have a similar construct?


You may write in C++ 14

int a = 1'000'000;

In C such a feature is absent.