Define conversion operator?, C/C++ Programming

Assignment Help:

Define conversion operator??


Related Discussions:- Define conversion operator?

C program to copy the contents of a file, C Program to copy the contents of...

C Program to copy the contents of a file: void main()    {   ifstream fin("input.txt");   ofstream fout("output.txt");   char ch;   while (fin)       {

Function, write a function named "fact"that takes one integer arguments,ca...

write a function named "fact"that takes one integer arguments,call them "num" and returns as ..............

Explain floating literal, Floating  literal They can be written in comm...

Floating  literal They can be written in common decimal as well as scientific notation (floating point representation). By default it is of type double. F, L is applied only to

Programming, pseudocode for gregorian calendar

pseudocode for gregorian calendar

Loop, wap to count the numof string present in a word

wap to count the numof string present in a word

Explain the parts of operators, Explain the parts of operators Assignm...

Explain the parts of operators Assignment Operators The equal (=) sign is used for assigning a value to another. The left hand side has to be a variable (lvalue, which exc

Described storage qualifiers in c++ ?, A: They are following: Const: poi...

A: They are following: Const: point out that memory once initialized, must not be modify through a program. Volatile: denote that value in the memory location can be modified

Vb.net, write a program that would accept the radius of the sphere and retu...

write a program that would accept the radius of the sphere and return its surface area.

Functions, write a program to calculate gross salary and net salary using h...

write a program to calculate gross salary and net salary using hra da pf in c++

C++, how do i write a c++ program that will input a number and output its f...

how do i write a c++ program that will input a number and output its factorial using the while loop

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