INDEX DIRECTORY
Traditional conversion methods and user-defined Conversion
Const_cast
Reinterpret_cast
Static_cast
Dynamic_cast
Why are there the four conversion operators?
It seems that I should summarize all the content about C ++ type
Variable, data type and type conversion, variable data type conversion
Objective: To master basic java syntax knowledge
1 variable
Variable is the amount in change, and the value in the variable is changed. in java, you must declare the variable
variables | conversion???? We know that Java data types are grouped into three categories, Boolean, character, and numeric, and the numeric type is divided into integers and floating-point types, and the Java variable type is Boolean, as opposed to
Java data types are classified into three categories: Boolean, numeric, and numeric. The numeric type is classified into integer and floating point types. Compared with the data type, Java variable types are Boolean; character char; integer byte,
Objective C # Principle 28: Avoid Conversion
Item 28: avoid conversion Operators
A conversion operation is a conversion operation between substitutability. A class can replace another class. This may be a good thing: An object of a derived class
1. Integer PromotionIn an expression, any place where an int or unsigned int type can be used to do the right value can also use a signed or non - the char, short, and Bit-field symbols. If the value range of the original type can be represented by
1. Variables
Variable refers to the amount of changes that can occur at any time during program running.
Syntax: data type variable name;
For example, string stra = "this is a string ";
2. Constants
It is also called a constant, which is a constant
C ++ type conversion usage
This is the second article in more than Itve C ++ about type conversion, and it is also well understood.Item M2: C ++ type conversion whenever possibleThink about cast, which is just as ugly as a GOTO statement in
Think about cast, which is just as ugly as a goto statement in programming. But it is not tolerable, because type conversion is a necessity at some critical points.
However, the C-style type conversion does not represent all the type conversion
In computer languages, the existence of types allows us to process data and functions more specifically, but there is a problem of type conversion. C ++ has the same problems as other computer languages. However, it has more Reference types than C,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.