Using class as by reference parameter

Back to topics list To post a new topic, please log in or register
avatar
10
antimetro 2015.06.10 09: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 

avatar
Moderator
3206
angevoyageur 2015.06.10 17:18 #
 
Please show your code if you need help.
avatar
12983
WHRoeder 2015.06.10 18: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
Back to topics list  

To add comments, please log in or register