![]() If the cast cannot be made, the cast fails and the expression evaluates to null. This type of casting manipulates the const attribute of the passed object, either to be set or removed.ĭynamic_cast (expr) − The dynamic_cast performs a runtime cast that verifies the validity of the cast. ![]() The target type must be the same as the source type except for the alteration of its const or volatile attributes. There are other casting operators supported by C++, they are listed below −Ĭonst_cast (expr) − The const_cast operator is used to explicitly override const and/or volatile in a cast. The most general cast supported by most of the C++ compilers is as follows − ![]() As an operator, a cast is unary and has the same precedence as any other unary operator. A cast is a special operator that forces one data type to be converted into another.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |