Answer Posted / swarna sekhar dhar
A constructor that can be called with a single argument is
used for conversions from the type of the argument to the
class type. Such a constructor is called a conversion
constructor. Consider the following example:
/ spec1_conversion_constructors.cpp
class Point
{
public:
Point();
Point( int );
//...
};
int main()
{
}
Sometimes a conversion is required but no conversion
constructor exists in the class. These conversions cannot be
performed by constructors. The compiler does not look for
intermediate types through which to perform the conversion.
For example, suppose a conversion exists from type Point to
type Rect and a conversion exists from type int to type
Point. The compiler does not supply a conversion from type
int to type Rect by constructing an intermediate object of
type Point.
| Is This Answer Correct ? | 16 Yes | 1 No |
Post New Answer View All Answers
What is the full form of stl in c++?
To which numbering system can the binary number 1101100100111100 be easily converted to?
Why do we need constructors in c++?
Difference between delete and free.
What is :: operator in c++?
What is lambda expression c++?
Describe new operator?
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
Why is polymorphism useful?
What are vtable and vptr?
What is the default access level?
What is the difference between the functions rand(), random(), srand() and randomize()?
can any one help to find a specific string between html tags
which is changed to a sting..
weather.html looks (for location) is