[question] Constant

With the const prefix you can declare constants with a specific type in the same way as you would do with a variable:

const int pathwidth = 100;
const char tabulator = '\t';

In the tutorial it says that a constants value cannot be changed once it is declared. Does that mean that I can't say pathwidth = pathwidth + 2;

After I have declared it?
No, you can't change them. That's why they're constants.
Yes, that is why it is called a constant.
Topic archived. No new replies allowed.