why to use template classes in c++?

Answer Posted / swati

the template classes are use for the reuse of the data
types which you want to use the program for many times

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the drawback of classical methods in oops?

2915


What is coupling in oops?

592


What is the fundamental idea of oop?

634


What are the benefits of oop?

602


What is encapsulation with real life example?

566






How do you define social class?

596


What is purpose of inheritance?

641


What is the difference between inheritance and polymorphism?

585


Why is polymorphism used?

580


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1696


What is overriding in oop?

548


What is for loop and its syntax?

595


What is abstract class in oops?

596


Can abstract class have normal methods?

608


What is polymorphism programming?

599