Define conversion operator?, C/C++ Programming

Assignment Help:

Define conversion operator??


Related Discussions:- Define conversion operator?

Quicksorting in linked lists, How do i write a code in C++ to bubblesort in...

How do i write a code in C++ to bubblesort in linked list

Explain conversion functions, Conversion Functions Conversion functions...

Conversion Functions Conversion functions are member functions used for the following purposes: 1. Conversion of object to basic data type. 2. Conversion of basic data ty

Program to calculate gross pay and tax payable, Study the following table u...

Study the following table used to compute the tax payable by employees in certain organization   Gross Pay                                  Fewer than Three             Three

Source code for decoe to code, i am using mobile phone if i want to communi...

i am using mobile phone if i want to communicate via massage but that should be very secret

Miniumshelf, write a prgm to find minimum total number of shelves including...

write a prgm to find minimum total number of shelves including the intial one required for loading process

C program for count any characters which is u want, # include stdio.h> #...

# include stdio.h> # include string.h> # include conio.h> void main()   {           int i=0,count=0;           char a[100],b;           clrscr();

Law of motion, Ask question asdasasas#Minimum 100 words accepted#

Ask question asdasasas#Minimum 100 words accepted#

Arrays, #questi An array of n numbers is given, where n is an even number. ...

#questi An array of n numbers is given, where n is an even number. The maximum as well as minimum of these given numbers need to be determined. Which of the following is true about

Explain operator overloading fundamentals, Operator Overloading Fundamental...

Operator Overloading Fundamentals The C language uses the concept of Operator Overloading discreetly. The asterisk (*) is used as multiplication operator as well as indirect

3/15/2013 5:14:59 AM

Define conversion operator??

A: class can have a public method for specific data type conversions. For instance:

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. conversion operator now 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