enum hello {a, b, c, d, e};
Over here a = 0, b = 1, c = 2 etc....
Question:
Is it possible to declare an enum number other than integer like float or double?
If it is float, 'a' should be 0.0 and b = 1.0 ......
enum hello {a, b, c, d, e};
Over here a = 0, b = 1, c = 2 etc....
Question:
Is it possible to declare an enum number other than integer like float or double?
If it is float, 'a' should be 0.0 and b = 1.0 ......
Try assigning the values. If it takes them then u r through. else thats the only way...
try
enum hello (a=1.1, b=2.2);
Try it.
Regards,
Sriharsha.
> Is it possible to declare an enum number other than integer like
> float or double?
No. Enumerations are integral values only, just like 'case' values.
Quzah.
Hope is the first step on the road to disappointment.