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...

template<class T, class X> class Obj {
T my_t;
X my_x;
public:
Obj(T t, X x) : my_t(t), my_x(x) { }
};
Referring to the sample code above, which one of the
following is a valid conversion operator for the type T?
a) T operator T () { return my_t; }
b) T operator(T) const { return my_t; }
c) operator(T) { return my_t; }
d) T operator T (const Obj &obj) { return obj.my_t; }
e) operator T () const { return my_t; }

Answer Posted / guest

option 'e' is the correct one

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you overload the operator+ for short integers?

1044


What is the use of data hiding?

1019


What is static in c++?

1063


What are the advantages of using typedef in a program?

1142


daily Routine of father

1412


How long does it take to get good at leetcode?

1179


What is the difference between a baller and a reference in C++?

1124


What is virtual base class uses?

1361


What is the use of namespace std in C++?

1071


What is anonymous object in c++?

1101


When to use “const” reference arguments in a function?

1075


Out of fgets() and gets() which function is safe to use and why?

1191


Is c++ map a hash table?

1028


What is pure virtual function?

1067


Which software is used for c++ programming?

1084