Jan 4, 2020 in C Plus Plus
Q: Digit separators C++ 14 Feature

1 Answer

0 votes
Jan 4, 2020

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;

Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

+1 vote
Jan 4, 2020 in C Plus Plus
  • #c11
  • #c14
+1 vote
Jan 4, 2020 in C Plus Plus
...