class Script { public: template < typename T > void add ( Indicator <T> * oIndicator ) {} };
fxsaber, You're solution works
But i found like this , it was better for next step.
ty for time ;)
class IndicatorSettings { public: IndicatorSettings ( ) {} }; class RsiSettings : public IndicatorSettings { public: RsiSettings ( ) : IndicatorSettings() {} }; interface iIndicator {} template < typename T > class Indicator : public iIndicator { public: Indicator( ) {} }; class IRsi : public Indicator < RsiSettings > { public: IRsi( ) : Indicator( ) {} }; class Script { public: void add ( iIndicator * oIndicator ) {} }; IRsi * indic = new IRsi(); Script::add(indic);
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
Hi i have a problem with type i think
Some one can help me to understand how work it ? ty :)