DECLARATION QUESTION

What is

const int= 12
constint = 13

I know is looks simple, but it is giving me ratherhardtime understandingtjhe meaning of it.

Neither of those are legal statements. Maybe it would help if you provided some context and details with your question.

My guess is that it's an error. The first statement needs a variable name, as in:

const int myVariable = 13;

which creates and integer variable that cannot be changed while the program runs. The second statement looks like the first, but with a space missing (hence wrong), or it could be an assignment statement of 13 into a variable named constint.

Delta_G:
Neither of those are legal statements. Maybe it would help if you provided some context and details with your question.

Why is the second statement illegal?

econjack:
Why is the second statement illegal?

I assumed it was supposed to have a space there. I guess you could have a variable named constint. I was just taking context from the other line.

Delta_G:
I assumed it was supposed to have a space there. I guess you could have a variable named constint. I was just taking context from the other line.

Agreed, plus that would not seem like a very good variable name.

econjack:
My guess is that it's an error. The first statement needs a variable name, as in:

const int myVariable = 13;

which creates and integer variable that cannot be changed while the program runs.

Is it compile time or run time?

sterretje:
Is it compile time or run time?

Compile time.

So it can be changed when the program runs :smiley:

Why is the second statement illegal?

It needs a semi-colon on the end.