Really simple question about C++ constness.
So I was reading this post, then I tried out this code:
int some_num = 5;
const int* some_num_ptr = &some_num;
How come the compiler doesn't give an error or at least a warning?
The way I read the statement above, it says:
Create a pointer that points to a constant integer
But some_num is not a constant integer--it's just an int.