static member of template class

 

Hello


I am trying to declare and initialise static member of mql template class , but my syntax not working


template<typename t>
class C_Test
{
    public:
    static uint mvs_data;

};

//compiler does not like this part
template<typename t>
uint C_Test<t>::mvs_data = 4;



Anyhelp much appreciated 

cheers

 
JamesWoods:

Hello


I am trying to declare and initialise static member of mql template class , but my syntax not working


template<typename t>
class C_Test
{
    public:
    static uint mvs_data;

};

//compiler does not like this part
template<typename t>
uint C_Test<t>::mvs_data = 4;



Anyhelp much appreciated 

cheers

template<typename t>
uint C_Test::mvs_data<t> = 4;


 
Amir Yacoby #:


Thanks you very much indeed sir