Consider a c++ template funtion
template<class T>
T& Add(T a, T b){return a+b ;}
if this function is called as
T c = Add("SAM", "SUNG");
what will happen? What is the problem in the template
declaration/ How to solve the problem.
Answer Posted / prasad
i will provide error.
declare template function as,
T Add(T a, T b){return a+b ;}
| Is This Answer Correct ? | 10 Yes | 4 No |
Post New Answer View All Answers
Will c++ be replaced?
What is the keyword auto for?
Which software is best for c++ programming?
What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number
What is the use of map in c++?
What is c++ flowchart?
Differentiate between late binding and early binding. What are the advantages of early binding?
What is a dll entry point?
What are proxy objects in c++?
What is the best it certification?
What is c++ coding?
What are c++ tokens?
Explain one-definition rule (odr).
What is stl containers in c++?
Explain what you mean by a pointer.