Type Conversion in C++
A type cast is basically a conversion from one type to another. There are two types of type conversion:
Implicit Type Conversion Also known as ‘automatic type conversion’.
• Done by the compiler on its own, without any external trigger from the user.
Explicit Type Conversion: This process is also called type casting and it is user-defined.
In contrast of class
There are three types of type conversion are possible:
1. Conversion from basic type to the class type.
2. Conversion from class type to basic type.
3. Conversion from one class to another class type.
Conversion from Basic type to the Class type
In this type of conversion basic type is converted into class type.
The conversion from basic type to the class type can be performed by two ways:
1. Using constructor
2. Using Operator Overloading
Conversion from Class type to Basic type
In this type of conversion class is converted into basic data types
Conversion from one Class to another Class type
In this type of conversion one class is converted into another class
For more information visit:
http://www.hexainclude.com/type-conve...
http://www.hexainclude.com/basic-to-c...
https://www.geeksforgeeks.org/how-to-...
music information:
You’re free to use this song in any of your videos, but you must include the following in your video description:
I Am a Man Who Will Fight for Your Honor by Chris Zabriskie is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/...)
Source: http://chriszabriskie.com/honor/
Artist: http://chriszabriskie.com/
On this page of the site you can watch the video online Type Conversion in C++, Basic to Class, Class to Basic, Class to Class with a duration of hours minute second in good quality, which was uploaded by the user CJ Singh Lectures 09 April 2020, share the link with friends and acquaintances, this video has already been watched 1,002 times on youtube and it was liked by 21 viewers. Enjoy your viewing!