what is difference between class template and template class?



what is difference between class template and template class?..

Answer / Rajeev Raghuwanshi

Class Template and Template Class are both used in C++ to achieve generic programming, but they are slightly different. A Class Template allows you to create a generalized class that can be instantiated for specific data types at the time of use, while a Template Class is a template for a class itself. In other words, a Class Template is used to create a generic instance of a class, whereas a Template Class is used to create a generic class definition.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

How do you explain polymorphism?

1 Answers  


what is the main difference between sizeof() operator in c and c++

3 Answers  


What is a linked list?

10 Answers   IBM, Neural Info,


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

1 Answers  


Is html an oop?

1 Answers  


Are polymorphisms mutations?

1 Answers  


Difference ways of Polymorphism?

3 Answers  


write a program for function overloading?

14 Answers   HCL, InfoCity, TATA,


What is namespace?

15 Answers  


What is the differances between a abstract calss and interface

5 Answers   Aviva, Symphony,


Can you name some types of inheritance?

1 Answers   Motorola,


We have a scale and 7 balls. 1 ball is heavier than all the rest. How to determine the heaviest ball with only 3 possible weighing attempts?

8 Answers   IBM, Sage, Vertex,


Categories