If it bothers you, call it a "const identifier" instead.
The main issue is to figure out what it is; we can figure out what to
call it later. For example, consider the symbol max in the following
function:
void f()
{
const int max = 107;
...
float array[max];
...
}
It doesn't matter whether you call
max a
const variable or a
const
identifier. What matters is that you realize it is like a normal variable in
some ways (e.g., you can take its address or pass it by const-reference), but
it is unlike a normal variable in that you can't change its value.
Here is another even more common example:
class Fred {
public:
...
private:
static const int max_ = 107;
...
};
In this example, you would need to add the line
int Fred::max_; in
exactly one .cpp file, typically in
Fred.cpp.
It is generally considered good programming practice to
give each "magic number" (like 107) a symbolic
name and use that name rather than the raw magic number.