Saturday, October 30, 2010

OVERLOADING-OPERATORS



You can redefine or overload the function of most built-in operators in C++. These operators can be overloaded globally or on a class-by-class basis. Overloaded operators are implemented as functions and can be member functions or global functions.

Operator overloading involving vector types is not supported.

An overloaded operator is called an operator function. You declare an operator function with the keyword operator preceding the operator. Overloaded operators are distinct from overloaded functions, but like overloaded functions, they are distinguished by the number and types of operands used with the operator.

Consider the standard + (plus) operator. When this operator is used with operands of different standard types, the operators have slightly different meanings. For example, the addition of two integers is not implemented in the same way as the addition of two floating-point numbers. C++ allows you to define your own meanings for the standard C++ operators when they are applied to class types
----------------------------------------------------------------------------------------------

A C++ PROGRAM TO IMPLEMENT OPERATOR OVERLOADING IN COMPLEX ARITHMETIC

COMPILER EMPLOYED: DEV C++ COMPILER-4.9.9.2

SOURCE FILE SIZE :3 kb

EXE FILE SIZE :580 kb

NOTE: PLEASE INCLUDE THE DESIRED HEADER FILE

---------------------------------------------------------------------------------------------

C++ PROGRAM SOURCE & EXE DOWNLOAD:

Click download button to download

DISCLAIMER: The following program cannot be ensured of perfection.so any flaws in the program can be notified in the comments section.


----------------------------------------------------------------------------------------------

A C++ PROGRAM TO OVERLOAD NEW & DELETE OPERATOR

COMPILER EMPLOYED: DEV C++ COMPILER-4.9.9.2

SOURCE FILE SIZE :3 kb

EXE FILE SIZE :580 kb

NOTE: PLEASE INCLUDE THE DESIRED HEADER FILE

---------------------------------------------------------------------------------------------

C++ PROGRAM SOURCE & EXE DOWNLOAD:

Click download button to download

DISCLAIMER: The following program cannot be ensured of perfection.so any flaws in the program can be notified in the comments section.


----------------------------------------------------------------------------------------------

A C++ PROGRAM TO OVERLOAD STREAM OPERATORS

COMPILER EMPLOYED: DEV C++ COMPILER-4.9.9.2

SOURCE FILE SIZE :1 kb

EXE FILE SIZE :575 kb

NOTE: PLEASE INCLUDE THE DESIRED HEADER FILE

---------------------------------------------------------------------------------------------

C++ PROGRAM SOURCE & EXE DOWNLOAD:

Click download button to download

DISCLAIMER: The following program cannot be ensured of perfection.so any flaws in the program can be notified in the comments section.


----------------------------------------------------------------------------------------------
Your's friendly,

[MOHANRAM.G],
ADMIN...

0 comments:

Post a Comment