Are constants, defined by using the keyword const , external linkage or internal linkage?
Can constants be modified using pointers?
What about constants defined using by #define?
DJSAN10 28 Posting Whiz in Training
Recommended Answers
Jump to PostAre constants, defined by using the keyword const , external linkage or internal linkage?
Can constants be modified using pointers?
What about constants defined using by #define?Can constants be modified? It really depends on what you mean by modified. Does that imply the use of memory management functions?
Jump to Postconst-qualified variables aren't the same as constants.
int const i = 5;
5 is a constant. i is a variable that happens to be const-qualified, which means you can't modify it directly. Constants can never be modified, because at runtime they usually don't exist. const-qualified variables, well, …
All 6 Replies
alexchen -12 Junior Poster
gerard4143 371 Nearly a Posting Maven
Trentacle 112 Junior Poster in Training
chrjs 42 Junior Poster in Training
gerard4143 371 Nearly a Posting Maven
DJSAN10 28 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.