Is there a way to write a large number in C++ source code with spaces to make it more readable? [duplicate]

Try digit separator:

int i = 1'000'000'000;

This feature is introduced since C++14. It uses single quote (') as digit separator.


Also see:

  • Why was the space character not chosen for C++14 digit separators?
  • Generalizing Overloading for C++2000 (April’s joke by the father of C++ himself)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)