hello everyone!i have some problem using enumerations.
suppose we have
enum fruit{apple,banana,mango};
main()
{
fruit a=apple;
cout<<a;
the problem is that compiler understands apple as 0,banana as 1 and mango as 2.
the output here is 0
how can we output "apple" using this enumeration..
@ Mohamad Fouad,i tried it in that way,three errors came
undefined symbol 'string'
statement missing ;
undefined symbol 'fruits'
'a' is assigned a value that is never used
1st and 2nd point to the line string[fruits];
3rd error in line fruits[0]= "apple";