I was able to use conts but not constexprs

Im learning on Ubuntu 16.04 using between VS Code and Code::Blocks and it would not complie with Constexprs but it would with const is this a common problem with linux compliers


Const and Constexprs aren’t the same thing.

Const are variables that cannot be modified later in the code (when the program is running).

Constexprs are variable that can be calculated at compile time (when the program is buildt, before even running).

Do you have a code example?


Privacy & Terms