// constexpr is a value that will not change (static) and is set at the compilation time
#include <iostream>
class Example {
public:
static constexpr int num = 34;
Example() {};
};
int main() {
Example obj;
std::cout << obj.num << "\n";
int x = obj.num + 52;
std::cout << x;
// obj.num = 100; // error: assignment of read-only variable 'Example::num'
}
/*
run:
34
86
*/