Conversion operator, C/C++ Programming

Assignment Help:

What is conversion operator? Explain it with example.


Related Discussions:- Conversion operator

Abstract array - c program, Abstract array - c program: AbstractArray:...

Abstract array - c program: AbstractArray::AbstractArray( int anUpper, int aLower, sizeType aDelta ) {     PRECONDITION( anUpper >= aLower );     lastElementIndex = a

AlgorithmS, Algorithm to find the value of the powers raised by integer

Algorithm to find the value of the powers raised by integer

#title. RETIRED ON SOCIAL SECURITY., IS IT POSSIBLE FOR YOU TO WRITE A PR...

IS IT POSSIBLE FOR YOU TO WRITE A PROGRAM FOR ME TO MEASURE EXISTING ANGLES AND DO IF AND THEN FROM THIS , AND TO PLACE FIXED ANGLES AT CERTAIN POSITION AS A ADD WITH DLL FOR CERTA

Write a program to sort an array of strings, Write a program to sort an arr...

Write a program to sort an array of strings. Use new and delete operators. Write a program to find the factorial of a number using recursion. If we do not accept the number

Declaration of variables in cpp, Declaration of Variables: Variables ar...

Declaration of Variables: Variables are declared as follows: int a; float b;   Assigning value to variables: int a = 100; Declaring and assigning is called ini

Writing a c++ program, how can I write a c++ program that generate all evn ...

how can I write a c++ program that generate all evn numbers less than 1000?

Find the largest and smallest average, Use the above problem and have ...

Use the above problem and have the program print the biggest and smallest sales for each employee for everyday of the month. Program should also find the largest and

Random question, Ask question #write statement that assign random integer t...

Ask question #write statement that assign random integer to the varaible n in the (100

Write a program that finds the minimum total number of she., Write a progra...

Write a program that finds the minimum total number of shelv, C/C++ Programming

Jack

2/13/2013 1:10:23 AM

Try this, it will definitely help you

Class can have a public method for particular data type conversions.

class Boo

{

double value;

public:

Boo(int i )

operator double()

{

return value;

}

};

Boo BooObject;

double i = BooObject; // assigning object to variable i of type double. 

now conversion operator gets called to assign the value.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd