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

When should we use multiple inheritance?

1096


Can we use pointers in c++?

1113


How do you show the declaration of a virtual constructor?

994


When should overload new operator on a global basis or a class basis?

1133


What is the use of lambda in c++?

1079


What are all predefined data types in c++?

1171


Can I learn c++ as my first language?

1154


Can a program run without main in c++?

1288


Write about the local class and mention its use?

1133


How do you flush a buffer in c++?

1144


What is the best it certification?

1162


How do we balance an AVL Tree in C++?

1186


What are the uses of c++ in the real world?

1093


Is c++ vector dynamic?

1213


What is the c++ programming language used for?

1093