What is some instance of operator overloading?, C/C++ Programming

A: Here are a few of the many instance of operator overloading:

myString + yourString may concatenate two std::string objects myDate++ may increment a Date object

a * b may multiply two Number objects

a[i] may access an element of an Array object

x = *p may dereference a "smart pointer" that "points" to a disk record .it could seek out to the location on disk where p "points" and return the proper record into x

 

Posted Date: 3/20/2013 3:44:03 AM | Location : United States







Related Discussions:- What is some instance of operator overloading?, Assignment Help, Ask Question on What is some instance of operator overloading?, Get Answer, Expert's Help, What is some instance of operator overloading? Discussions

Write discussion on What is some instance of operator overloading?
Your posts are moderated
Related Questions
write a program to generate padovan sequence in c++

Return by reference: The return value of the function must be an address variable.  In following program the function returns the value of x or y and their types are declare

(a) Write a recursive procedure (digits n) that computes the number of digits in the integer n using a linear recursive process. For example, (digits 42) should return 2 and (digit

Task 1 Demonstrate a Java client and server exchanging one text message in each direction. Task 2 Demonstrate a C client and server exchanging one text message in each

Described the difference among "new" and "operator new" ? A:"operator new" works such as malloc.

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

6999066263304447777077766622337778 -----> message sent by the first smuggler. my name is robert---------> message decoded by the second smuggler. Where ‘0’ denotes the "space". Ex

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b


A more advanced data type is the structure; here we can define a template as a collection of different variables e.g.     struct birthdate   {     int month;     int day;