Type conversion using Operator overloading
The type conversions are automatic only when the data type involved are built-in types.
int m;
float x= 3.012
m=x; // convert c to integer before its value is assigned t m.
For user-defined data types, the compiler does not support automatic type conversations.
We must design the conversion routines by ourselves.
The type conversions are automatic only when the data type involved are built-in types.
int m;
float x= 3.012
m=x; // convert c to integer before its value is assigned t m.
For user-defined data types, the compiler does not support automatic type conversations.
We must design the conversion routines by ourselves.
- Three situations for incompatible matches
- From built in type to a class type
- From class type to built-in type
- From one class type to another class type
Really Happy to say your post is very interesting. Keep sharing your information regularly for my future reference. Thanks Again.
ReplyDeleteTop Big Data Companies
Top Data Analytics Companies
Top text analytics Companies
Top Software testing companies
Top Machine Learning Companies
Top Mobile App Development Companies