Differentiate between a template class and class template?



Differentiate between a template class and class template?..

Answer / beena

Template class:

A generic definition or a parameterized class not instantiated until the client provides the needed information. It’s jargon for plain templates.

Class template:

A class template specifies how individual classes can be constructed much like the way a class specifies how individual objects can be constructed. It’s jargon for plain classes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is stl containers in c++?

0 Answers  


Show the declaration for a static function pointer.

0 Answers  


Differences between private, protected and public and give examples.

0 Answers  


What is a literal in c++?

0 Answers  


How many types of modularization are there in c++?

0 Answers  






can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is <location>somewhere</location> #include <iostream> #include <fstream> #include <string> using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<<location << endl; cout << "Temperature: " << temperature << endl; system("pause"); } string find_field(string myPage,string find_string){ int temp=myPage.find(find_string); if(temp!=string::npos) { cout << "Match found at " << temp << endl; } return "found?"; } ///

0 Answers  


What is conversion constructor?

2 Answers   TCS,


can anybody please tell me how to write a program in c++,without using semicolon(;)

6 Answers   NIIT,


I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.

0 Answers  


How are Structure passing and returning implemented by the compiler?

0 Answers  


what is importance of data sturture in a programming language?

22 Answers   L&T, TCS, Wipro,


What is runtime polymorphism in c++?

0 Answers  


Categories