S
SpOiLeR
Hi!
q1:
What is C++ equivalent for:
#define MY_CHAR_ARRAY_CONSTANT "My constant"
if I want to define that constant in protected area of some class?
I assume it has something to do with static const data members but can't
figure out right syntax.
q2:
If I have something like this:
static const int MY_CONST = 5;
in some class, is it really equivalent to this:
#define MY_CONST 5
By "equivalent" I mean that it is real compile time constant where MY_CONST
is replaced my preprocessor and it is not taking up any memory during
runtime.
q1:
What is C++ equivalent for:
#define MY_CHAR_ARRAY_CONSTANT "My constant"
if I want to define that constant in protected area of some class?
I assume it has something to do with static const data members but can't
figure out right syntax.
q2:
If I have something like this:
static const int MY_CONST = 5;
in some class, is it really equivalent to this:
#define MY_CONST 5
By "equivalent" I mean that it is real compile time constant where MY_CONST
is replaced my preprocessor and it is not taking up any memory during
runtime.