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
Your approach is clear to me. But I wanted to learn something new.
I've tried this:
but without success.
Try my MT5 (ME above 1601).
Your code is OK (and clear to me) but I try to compile nicholishen's code (without success)
Your approach is clear to me. But I wanted to learn something new.
I've tried this:
but without success.
It's a pointless practice because this is a design pattern meant for polymorphism and not template classes... If you need a variance of classes based on a set of conditions then they need to inherit from a common ancestor. And even then you better be dynamically casting them at runtime and checking for errors...
It won't compile because
It's a pointless practice because this is a design pattern meant for polymorphism and not template classes... If you need a variance of classes based on a set of conditions then they need to inherit from a common ancestor.
The first example without templates:
The second example without templates (can't be compiled):
I know it is a pointless design pattern but I was curious if we can use pointer as an template <CFoo*>. I've never used it before and I'm not sure if it is possible. I've written two examples those should be the same. The first one without using templates and the second one with using templates. But the second one can't be compiled. My question is: Is it possible using pointers in templates?
The first example without templates:
The second example without templates (can't be compiled):
this code compiles fine with ME build 1755, but not with build 1601 (used with MT4 build 1090).
I see
I tried to compile it with MT4. It is alright with MT5.
Conclusion:
EDIT: The above conclusion is valid for using pointers as returned parameters of functions (like in my examples).
Thank you Alain for your patience.
not sure why you didn't get it ?
Me neither. Maybe I'm too stupid.
I see
I tried to compile it with MT4. It is alright with MT5.
Conclusion:
Actually it's not exact. It's only when the pointer is used as return parameter of a function. So when you need to use something like :
Example that compiles with ME 1601.
Thank you Alain for your patience.
Me neither. Maybe I'm too stupid.
Actually it's not exact. It's only when the pointer is used as return parameter of a function.
I wasn't clear enough. Of course I meant the case when the pointer is used as a returned parameter. I'll edit my previous post.