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
Which constructor gets called while I create an array of Fred objects?

calculate the total resisitance of a series circuit?

This task involves char arrays and pointer based string handling. Which we use to make a simple encryption program, using a Caesar Cipher, Write a program that: a. Asks


Write a function that has a single int parameter n and returns an int: 0 if n is negative, otherwise 1. You are not allowed to simply check the integer value, and should use the fu

C Program for DIVISER   void main() {           int result,number,min;           clrscr();           printf("ENTER THE NUMBER=");           flushall();

Q: In p = new Fred(), does the Fred memory "leak" if  Fred constructor throws an exception? A: No.         If an exception take place during the Fred constructor of p = new F

A: In C++, the definition of NULL is 0, thus there is only an aesthetic difference. I prefer to ignore macros, so I employ 0. Another difficulty with NULL is that people sometimes

what is the purpose of pointer ? what is the syntax? how it works?

Create a mathematical number guessing game. Have the user prompt for the number of games that they want to play. Then each game consists of the following rules. a. The computer