What is the difference in following c++ codes -
const int x = 5000;
const int x = 50'00;
50'00
uses digit separator that was added in C++14. The number will resolve to 5000
, only difference is that it might be easier to read. Usually you would use digit separator to separate thousands, like 1'000'000
, but you are allowed to use it at any point in the number.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With