What is a constructor in c++ with example?
No Answer is Posted For this Question
Be the First to Post Answer
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; }
What is the advantage of c++ over c?
write a program that a 5 digit number and calculates 2 power that number and prints it.
2 Answers Vimukti Technologies,
Explain Memory Allocation in C/C++ ?
What is a Default constructor?
How does throwing and catching exceptions differ from using setjmp and longjmp?
if int1 has the value 12, int has the value 18, and int3 has the value 21, what is the result: int1 < int2 && int2 < int 3
Difference between strdup and strcpy?
write a program that takes two numbers from user that prints the smallest number
How do you establish an is-a relationship?
Why is "using namespace std;" considered bad practice?
Can recursive program be written in C++?