Define conversion constructor?, C/C++ Programming

Define conversion constructor?

Posted Date: 3/15/2013 4:07:42 AM | Location : United States





constructor with a single argument creates that constructor as conversion ctor and it can be utilized for type conversion.

For instance:

class Boo

{

public:

Boo ( int i );

};

Boo BooObject = 10; // assigning int 10 Boo object

Posted by | Posted Date: 3/15/2013 4:07:54 AM


Related Discussions:- Define conversion constructor?, Assignment Help, Ask Question on Define conversion constructor?, Get Answer, Expert's Help, Define conversion constructor? Discussions

Write discussion on Define conversion constructor?
Your posts are moderated
Related Questions
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

WHAT IS CGI?

For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, int pos) Assuming t

Operation on list - c++ program: Write a program in c to Insert value on list and list iteration. typedef struct item *node_ptr; struct item {                   int e

Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given

Program for Hangman Problem   #include   #include   #include   #include   #include   static void playGame();   static void printMistakes(int n);   st

Explain what are Unions? The Unions like as structures, contain members whose individual data types may perhaps differ from one another. Though the members that create a union

for object, malloc allocates memory in heap however doesn't invoke object's constructor to initialize the object. new allocates memory & also invokes constructor to initialize the

lcm program.

Increment and Decrement Operators.   The operator for increment is '++' and decrement is '-'. These operators enhances or decrease the value of a variable on which they are ope