![]() Related Questions A scope resolution operator (::), can be used to define the member functions of a class outside the class. Latest Answer : Scope resolution:As the name itself indicates,it resolves global scope to local scopeEx:int a=10;int main(){a=20;cout Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This Latest Answer : Here are some examples1) Function overloadingclass FuncOver {public: // Constructors can also be overloaded. FuncOver(); // Overloaded constructor. ... Namespaces allow us to group a set of global classes, objects and/or functions under a name. To say it somehow, they serve to split the global scope in sub-scopes known as namespaces. The form to Latest Answer : Namespace is simply a name given to a global space, to form a sub-space in global space. ... Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching Latest Answer : Virtual constructor is not build-in C++ feature but it doesn't mean its not used by devs in code and in conversations. There are many other things that doesn't exist in particular language yet, people find ways around to solve it (SingleTon, Virtual Constructor, ... We can overload assignment operator as a normal function.But we can not overload assignment operator We can overload assignment operator as a normal function.But we can not overload assignment operator as friend function why? What is the Basic nature of "cin" and "cout" and what concept or principle we are using on those two? Basically "cin and cout" are INSTANCES of istream and ostream classes respectively.And the concept which is used on cin and cout is operator overloading. Extraction and Insertion operators are Latest Answer : New operator allows to allocate a memory from the heap, so a new instance of
a class is created but operator New is used to overload the (new) operator just
like overloading of other operators.
Additionally:
The term "operator new" is ... Read Answers (5) | Asked by : suman Latest Answer : Inspite of repeated requests by some (few) sensible people to everybody to read the question properly before responding, nobody listens.For doreen, the question does not ask you to explain deep copy and shallow copy mechanism neither does is asks how ... Latest Answer : When the operator operates on the user defined data type or operands behaves same as it operates on inbuilt data type that mechanism is known as operator overloading. The operator that performs the specific task on inbuilt data type  performs similar ... Read Answers (6) | Asked by : santoshMudholam Class X{X(){}X(X &obj){} // supose '=' operator is also overloaded for this class. I am not writing code for that }main(){X a;X b = a;X c(&a);X d;d = a;}What is the difference between a, b, c, d objects ?
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||