Hello World,

I am trying to learn C++, but somehow I think in C++, 'C' is a constant not a variable. Is this a correct answer? I think it is but I cant prove >.<
Is that what your program is supposed to read out?

Can you please provide additional details, refine your question and maybe provide your source code. We can't help you if you don't provide more details.

Refer to http://www.cplusplus.com/forum/beginner/1/
Last edited on
C must be a variable, else you couldn't use the post increment operator on it.
closed account (zb0S216C)
dkXIII wrote:
I think in C++, 'C' is a constant not a variable. (sic)

Yes, you're right, 'C' isn't a variable. Moreover, judging by the quotation marks, I'm assuming you're referring to a character literal. If this is the case, then yes, literals are constant, neither do they have an address, just so you know, of course.

Wazzak
Last edited on
Topic archived. No new replies allowed.