Data type: The memory format that has been set.
Underlying data type:
Numeric type:
int N; Used to hold a 16-bit integer byte b; An integer long l for saving 0-255 ; Used to hold a 32-bit integer double D;//For saving decimals, double precision. float F; Used to save decimals, single precision.
Logical Type:
bool b; is used to save true or false, or it is real
The underlying type has a well-matched operation symbol.
One, numerical operation
int a,b,c;a=3; b=4; c=a*b;//conforms to arithmetic expression. +,-,*,/,(,)
It is recommended that you do not allow different data types to appear within the same expression. You can see a lot of reasons less.
Two, numerical comparison operation
int b; BOOL f;a=ten; b=n; f=a<b; <,>,<=,>=,==,!=; is greater than, less than, equal to, not equal to.
Three, logical operation
BOOL A,b,c;a=true; b=false; C=a| | b; Back to Truec=a&&b; Returns false
C + + syntax second basic type