Download MetaTrader 5
To add comments, please log in or register
Develop trading robots to order. Make profit with Freelance service!
Valerio Pittavino
95
Valerio Pittavino 2015.06.10 07:35 

Hi all,

I have a problem with mql4, I'm creating a script and I need to create an array of a my class, if I declare the array before start function (outside of each functions) the array will be not created and the compiler launch an error.

Then I tried to create a function which uses an parameter of type "my class" and it don't work, the compiler send an error "structure identifier cannot be used".

I can't understand, normally I write code in other language and always I can use an array of object as parameter

 

Thanks for any help 

Alain Verleyen
Moderator
28518
Alain Verleyen 2015.06.10 15:18  
Please show your code if you need help.
whroeder1
13593
whroeder1 2015.06.10 16:27  
antimetro: I need to create an array of a my class, if I declare the array before start function (outside of each functions) the array will be not created and the compiler launch an error.
  1. "launch an error" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here. 
  2. We can not see your code. You have to post it using SRC
  3. Structures and Classes - MQL4 Documentation specifically states that you must have a default constructor to create an array of the class
/
To add comments, please log in or register