C++ COM ActiveX Question:
Download Job Interview Questions and Answers PDF
Define the syntax and semantics for a function template?
Answer:
Templates is one of the features of C++. Using templates, C++ provides a support for generic programming.
We can define a template for a function that can help us create multiple versions for different data types.
A function template is similar to a class template and it syntax is as follows:
template <class T>
Return-type functionName (arguments of type T)
{
//Body of function with type T wherever appropriate
}
We can define a template for a function that can help us create multiple versions for different data types.
A function template is similar to a class template and it syntax is as follows:
template <class T>
Return-type functionName (arguments of type T)
{
//Body of function with type T wherever appropriate
}
Download C++ COM ActiveX Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain Component Object Model? | What is Component Object Model? |