in C Plus Plus by
Digit separators C++ 14 Feature

1 Answer

0 votes

In C++14, the single-quote character may be used arbitrarily as a digit separator in numeric literals, both integer literals and floating point literals.This can make it easier for human readers to parse large numbers through subitizing.

auto integer_literal = 1'000'000;

auto floating_point_literal = 0.000'015'3;

auto binary_literal = 0b0100'1100'0110;

auto silly_example = 1'0'0'000'00;