![]() |
||||||||||||||||||||
|
"exact phrase" include -exclude
will give you more specific results |
Class to class type in C++ [1/1]
There are situations, where we would like to convert an object of one class to an object of another. These conversions can be done either using casting operator function or constructor functions. The general form of conversion from one object to another is as shown above. Here the obj1 is an object of a class, say class A and obj2. an object of class B. Then class A is referred to as the destination class and the class B, the source class. In the conversion statement using the casting operator function operator typename(), type name specifies the destination class and this conversion takes place inside the source class, which needs to be type cast. This implies that the source class will be type cast to destination class type.
|
RECOMMENDED TUTORIALS
Need a specific tutorial? Do not hesitate and submit a request! |
||||||||||||||||||
| Related Tags:
class |
||||||||||||||||||||
|
Home | Sitemap |
Terms & Privacy
© ONLINEHOWTO.net 2006 - 2008 |
||||||||||||||||||||