Download MetaTrader 5
To add comments, please log in or register
MQL5 library has more than 1500 apps already. Contribute your own one!
Sherif Hasan
7223
Sherif Hasan 2015.01.05 05:47 

Hi,

Question as above?

I tried some code here. but it shows many error!

can anyone show me exact example to use enum? i tried search googling, no use?

enum CurrencyEnum
  {
   EUR,  
   USD,  
   GBP, 
   AUD,
   Something_else  // Other currencies
   
  };
  
extern CurrencyEnum currency = EUR; 
Keith Watford
Moderator
7906
Keith Watford 2015.01.05 09:00  
What errors are you getting?
Sherif Hasan
7223
Sherif Hasan 2015.01.06 05:41  
GumRai:
What errors are you getting?
CurrencyEnum' - unexpected token
currency' - expression on global scope not allowed
currency' - variable not defined
EUR' - expression on global scope not allowed
EUR' - variable not defined
enum' - expression on global scope not allowed
enum' - variable not defined
CurrencyEnum' - expression on global scope not allowed
CurrencyEnum' - variable not defined
{' - expression on global scope not allowed
'EUR' - variable not defined
'USD' - variable not defined
'GBP' - variable not defined
'AUD' - variable not defined
Keith Watford
Moderator
7906
Keith Watford 2015.01.06 07:40  
Look at the code above the code that you have posted, you have probably made an error there as ther is nothing wrong with your enum as far as I can tell
Edward Hirsch
685
Edward Hirsch 2015.01.06 07:41  
enum menu7 {
   menu7_0, // Server >>
   menu7_1, // PC >>
   menu7_2, // GMT >>
};
input  menu7  TimeClock=menu7_2;
type in all including the symbols //
whroeder1
13610
whroeder1 2015.01.06 16:38  
CurrencyEnum' - unexpected token
Stop there and look at the code above that line.
James Hodges
2780
James Hodges 2015.01.06 19:08  
Yes as WHRoeder mentioned, you need to look above the enum. Those errors seem to indicate that above that area you have some code that is either missing or has an extra closing bracket. With out seeing the code around your problem it's impossible to say. It has something to do with opening and closing a block of code. .... Happy Hunting! PipPip....Jimdandy
/
To add comments, please log in or register