Conversion constructor, C/C++ Programming

What is conversion constructor? explain it .

Posted Date: 2/13/2013 1:04:47 AM | Location : United States





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

This program will help you,

class Boo

{

public:

Boo( int i );

};

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

Posted by james | Posted Date: 2/13/2013 1:06:38 AM


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

Write discussion on Conversion constructor
Your posts are moderated
Related Questions
Unions A union is also like a structure, except that only single variable in the union is stored in the allocated memory at a time. It is a collection of mutually exclusive var

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

What is the use of default constructor? - It's a constructor that doesn't accept any parameters. - If there is no user-defined constructor for a class, compiler declares a d


C Program for FUNCTION OF COUNT THE INTEREST float si(float,float,float); void main() {           float p=0,r=0,n=0,k=0;           clrscr();           printf("E

A: In C++ a struct is alike to a class except for the default access specifier( refer to other question in the document). In C we ought to include the struct keyword while declarin


Define the Int Data Type of C Language? The int is used to define integer numbers. The Integers are whole numbers with a range of values supported by a particular machine and t

a) Implement a binomial tree class with a method that calculates the value of an option passed in to the class. The binomial tree should not rely on specific features of the differ

A: BinarySearchTree.h ---------------------- #ifndef BINARY_SEARCH_TREE_H_ #define BINARY_SEARCH_TREE_H_ #include "dsexceptions.h" #include // For NULL // Binary