0
Whats the difference between these two?
const int SIDE; SIDE = 10; And const int SIDE = 10;
2 Respuestas
0
hello Dark AR
const makes a variable constant,
i.e. const int side
side = 10;//will give error, it’s constant you cant declare const with the declaration
now you can do,
i.e. const int side = 10; // this is true
+ 1
A constant should be initialized at the time of declaration because it can not be re-initialized.
First one will give you error, second will not.