lundi 30 mai 2016

syntax template specialization c++

I have two classes: one "student" the second "employee" i have to write template class and in this class to write a function that getting the two > class. i need to activate a specific method of the student class and the employee class i know that

i need to use specialization, how i do it?

>     template<> void print_max<Student>(Student * s, int sizes)  {       
         s->
>     }

Aucun commentaire:

Enregistrer un commentaire