word

页面

mouse snow

2013年1月25日星期五

Visual C++

Data Types

Data Type C++ Keyword Bits Range
integer int 16 -32768 to 32767
long integer long 32 -4294967296 to 4294967295
short short 8 -128 to 127
unsigned integer unsigned 16 0 to 65535
character char 8 0 to 255
floating point float 32 approximately 6 digits of precision
double floating point double 64 approximately 12 digits of precision

Constants

Constant typeExamples
Integer Constants
- Short integer
- Integer
-Unsigned integer
- Long integer

-99  -35  0  45  127
-999 -1 0 555 32767
1 256 11000 59874
203 12 3345 8989898
Character Constants'$'  '*'  ' '  'd'  'H'  '1'
String Constants"Name:"  "Telephone No:"
Floating-piont Constants0.008  0.254E8  4.25E2



Operators

Arithmetic Operators

OperatorMeaning
-Subtraction (also unary minus)
+Addition
*Multiplication
?Division
%Modulus division
--Decrement
++Increment

Relational Operators

OperatorMeaning
<Less than
<=Less than or equal to
>Greater than
>=greater than or equal to
==Equal
!=Not Equal

Operator Precedence Hierarchy

Operator CategoryOperator
Unary-  --  ++
Arithmetic multiply, divide, remainder*  /  %
Arithmetic add and subtract+  -
Relational operators<  <=  >  >=
Equality operators==  !=
Logical AND&&
Logical OR
||

2013年1月23日星期三

My handset ~ HTC SENSATION XE





back to top