Hi All,
I have a number of EAs, all of which contain a large number of separate user defined functions. These functions are regularly used by each EA. However, if I need to make a code change to one of the functions I then have to go into each EA containing the same function and make the same change.
In order to avoid this hassle and to keep my EA code short and to save duplication, I wanted to include these functions within one mqh file and then call them in each EA using the #include <....> command.
Unfortunately, each of my functions contains variables which are normally defined at the start of my EAs. This then means when I try and compile the mqh file I receive an error as these variables don't exist in that particular file (as they are contained within my actual EA).
How would i get around this?
As I am not an experienced programmer, any easy to understand advice would be most welcome.
Thanks in advance....
CCH
I have a number of EAs, all of which contain a large number of separate user defined functions. These functions are regularly used by each EA. However, if I need to make a code change to one of the functions I then have to go into each EA containing the same function and make the same change.
In order to avoid this hassle and to keep my EA code short and to save duplication, I wanted to include these functions within one mqh file and then call them in each EA using the #include <....> command.
Unfortunately, each of my functions contains variables which are normally defined at the start of my EAs. This then means when I try and compile the mqh file I receive an error as these variables don't exist in that particular file (as they are contained within my actual EA).
How would i get around this?
As I am not an experienced programmer, any easy to understand advice would be most welcome.
Thanks in advance....
CCH