Download MetaTrader 5
To add comments, please log in or register
Carry on your private correspondence in your profile. It is secure!
Shaun Overton
104
Shaun Overton 2014.02.21 14:50 

I declared a method named EnterTrade() that only takes one variable, an enumeration named TradeDirection. The compiler throws the errors TradeDirection - declaration without type. Why won't this compile?

void EnterTrade(TradeDirection dir)

{

}

enum TradeDirection
{
Long, Short
};
whroeder1
13602
whroeder1 2014.02.21 15:34  
texasnomad: I declared a method named EnterTrade() that only takes one variable, an enumeration named TradeDirection. The compiler throws the errors TradeDirection - declaration without type. Why won't this compile?

  1. Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. void EnterTrade(TradeDirection dir){} // TradeDirection not defined (yet)
    enum TradeDirection{ Long, Short };   // Too late
/
To add comments, please log in or register