// const means “don’t change this” // constexpr means “known at compile time” // // constexpr is a horrible name. Too bad. // // If you’re a fan of C’s #define, use constexpr instead. #include #include using namespace std; int main() { const int alpha = rand(); constexpr int beta = rand(); // Nope--not a compile-time expression constexpr int gamma = 42; return alpha+gamma; }