Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the benefits of operator overloading?

1220


State two differences between C and C++.

1177


What is this weird colon-member (" : ") syntax in the constructor?

1029


Explain what you mean by a pointer.

1107


What is the difference between passing by reference and passing a reference?

1082


Write about the retrieval of n number of objects during the process of delete[]p?

1023


How a pointer differs from a reference?

1350


what are the iterator and generic algorithms.

2171


Why is c++ still used?

1092


How do I use turbo c++?

993


What are the advantages of using a pointer? Define the operators that can be used with a pointer.

1035


What is object in c++ wikipedia?

1011


What is atoi?

976


Is there a c++ certification?

1063


What is vectorial capacity?

1168