Constants
Apr 7, 2013 at 4:18pm
If I were to declare a constant variable but not initialize it, could I do so on another line?
Apr 7, 2013 at 4:24pm
Yes, just like any other variable. However it is best practice to do declare them on the same line.
example
1 2 3
|
const int NUM;
cout << "Hello world";
NUM = 5;
|
Topic archived. No new replies allowed.