+ 1
Why do we use constexpr and const in c++
I don't understand the use of constexpr and const.why would we want to make a variable immutable?
1 Antwort
+ 4
It will enable the compiler to make optimizations in the code, making it faster. Const declarations tell the compiler that the variables are read-only.