It is not necessary to implement or define a template in the header file but we can define in .cpp. But if you are defining the methods in .cpp file then you have to include .cpp file in template header file either you need to define the template type explicitly in .cpp file. Let me know if you want a detailed article on this topic.
Answer:
It is not necessary to implement or define a template in the header file but we can define in .cpp. But if you are defining the methods in .cpp file then you have to include .cpp file in template header file either you need to define the template type explicitly in .cpp file. Let me know if you want a detailed article on this topic.
need an explanation for this answer? contact us directly to get an explanation for this answer