T
Tomás
When you have a constant integral in a program, like the population of a
town, how do you declare it? A const variable or an enum?
Up until now I've always used variables, e.g.:
unsigned const population_dublin = 8274816;
I'm flipping through pages of Bjarne's book though at the moment, and
enum's seem pretty handy, as in:
enum { population_dublin = 8274816 }
Which style would you advocate?
-Tomás
town, how do you declare it? A const variable or an enum?
Up until now I've always used variables, e.g.:
unsigned const population_dublin = 8274816;
I'm flipping through pages of Bjarne's book though at the moment, and
enum's seem pretty handy, as in:
enum { population_dublin = 8274816 }
Which style would you advocate?
-Tomás