
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Question regarding #import
Lets say I have an expert called myexpert.mq4 that has the following function definition...
///// Code for myexpert.ex4 expert
#import "mylib.ex4"
#import
int AppFunc() {
// Do some stuff
return (0);
}
Notice that the "myexpert" expert imports a library called "mylib.ex4". In the "mylib" source I want to code something like....
//// Code for mylib.ex4 library
int init() {
/// Do initialization stuff for mylib....
/// Call the AppFunc function defined in the expert that imports this library
AppFunc();
}
AppFunc() is of course defined in the myexpert.mq4.
Within the code of the library "mylib" how could I use the #import function to tell the compiler that AppFunc() is actually defined in the ex4 file that will be importing "mylib.ex4". In effect I want the "mylib" library to make a call to the AppFunc() function that is defined in "myexpert".
Regards,
Laurence.