Technical Discussion :: C++
Home > Technical Interview Q&A > C++ > Discussion
105 / 187
Define class templates with multiple parameters?
Answer:
We can use more than one generic data types in a class template. They are declared as a comma separated list within the template specification as shown below:
Syntax:
Template
Class classname
{
----------
---------- ( body of the class)
};
Asked In ::
Shubhankar
23 Feb, 2019 5:07 AM
We can use more than one generic data types in a class template. They are declared as a comma separated list within the template specification as shown below:
Syntax:
Template
Class classname
{
----------
---------- ( body of the class)
};
Syntax:
Template
Class classname
{
----------
---------- ( body of the class)
};