Topics
Operating System
- Basics of Operating System (OS)
- Basics of Operating System (OS)
- Windows NT
- Introduction to GNU/Linux (GNU Not Unix)
- File Systems and Its Types
- File Operations
- Access Methods in Operating System
- Allocation Methods
- Concepts Related to Process Management
- Concepts Related to Memory Management
- Ubuntu is One of the Most Popular GNU/Linux Distributions
- Access and Security Aspects of O.S.
Data Structures
C++ Programming
- Introduction to C++ Programming
- Idea Behind Object-Oriented Programming
- Object-Oriented Programming Approach
- Object-Oriented Terms and Concepts
- Classes and Objects
- Constructors and Destructors
- Functions in C + +
- Arrays in Data Structure
- Pointers in C++
- References in C++
- Strings in C++
- Inheritance
- Virtual Functions and Polymorphism
- Friends in C++
- Operator Overloading and Type Conversions
- Files and Stream
HyperTex Markup Language (HTML)
- Introduction to HyperText Markup Language (HTML)
- HTML Documentation
- Basics of HTML Tags
- Font Tags in HTML
- Lists in HTML
- Tables in HTML
- Images in HTML
- Links in HTML
- HTML Scripts
- Defining an Overloaded Operator
- Steps for Overloading Operator
- Rules for Overloading Operators
- Types of Situations in Type Conversion
Operator overloading and type conversions
Overloading stands for "giving additional meaning to". We can overload all the operators except the following:
- Class member access operator (· , · *)
- Scope resolution operator -> ::
- Sizeof operator.
- Conditional operator (?:).
Defining operator overloading
To define an additional task to an operator, we must specify what it means in relation to the class to which the operator is applied. This is done with a special kind of function, called the operator function. The general form of operator function is:
return-type class-name : : operator op-to-be-overloaded (arg_list)
{
function-body // task defined
}
The process of overloading involves following steps:
- First, create a class that defines the data - type that is to be used in overloading operation.
- Declare operator function in public part of class. It may be either a member function or a friend function.
- Define the operator function to implement the required operations.
Rules for overloading operators
- Only existing operators can be overloaded. New operators cannot be created.
- The overloaded operator must have at least one operand that is user defined type.
- We cannot change basic meaning of the operator.
- Overloaded operators follow the syntax rules of the original operators.
- Certain operators cannot be overloaded. (See table 3.5).
- Certain operators cannot be overloaded by friend function . (See table 3.6)

Type conversions
When constants and variables of different types are mixed in an expression, complier applies rules of automatic type conversion s. The assignment operation also causes automatic type conversion. The type of data on right of an assignment operator is automatically converted to the type of variable on left. Compiler does not support automatic type conversion for user defined data types. We need to design conversion routines by ourselves, if such operation is required. Three types of situations may arise :
- Conversion from built in type to class type.
- Conversion from class type to built in type
- Conversion from one class type to another class type.
