The "const" purpose:

Greetings,

I think that “const” 's purpose is to keep whatever is initialized in a variable from being overwritten later on. I noted that when I put in the const for a variable, the terminal spat out “error C3892: you cannot assign to a variable that is const” and so would not compile. I could see this being useful in larger programs.

that makes a lot of sense.

Privacy & Terms