Iostream,iostrstream
Virtual constructor,
Template,STL,
Pointer,reference.
C++ key words:
asm, auto, bool, break, case, catch, char, class, const, const_cast, continue, default, delete, do, double, dynamic_cast, else, enum, explicit, export, extern, false, float, for, friend, goto, if, inline, int, long, mutable, namespace, new, operator, private, protected, public, register, reinterpret_cast, return, short, signed, sizeof, static, static_cast, struct, switch, template, this, throw, true, try, typedef, typeid, typename, union, unsigned, using, virtual, void, volatile, wchar_t, while
Reserved words:
and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq
Fundamental data type:
| Name | Description | Size* | Range* |
|---|---|---|---|
| char | Character or small integer. | 1byte | signed: -128 to 127 unsigned: 0 to 255 |
| short int (short) | Short Integer. | 2bytes | signed: -32768 to 32767 unsigned: 0 to 65535 |
| int | Integer. | 4bytes | signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295 |
| long int (long) | Long integer. | 4bytes | signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295 |
| bool | Boolean value. It can take one of two values: true or false. | 1byte | true or false |
| float | Floating point number. | 4bytes | 3.4e +/- 38 (7 digits) |
| double | Double precision floating point number. | 8bytes | 1.7e +/- 308 (15 digits) |
| long double | Long double precision floating point number. | 8bytes | 1.7e +/- 308 (15 digits) |
| wchar_t | Wide character. | 2bytes | 1 wide character |
Initialization of variables:
string mystring = "This is a string";
string mystring ("This is a string");//Constructor method.
| \n | newline |
| \r | carriage return |
| \t | tab |
| \v | vertical tab |
| \b | backspace |
| \f | form feed (page feed) |
| \a | alert (beep) |
| \' | single quote (') |
| \" | double quote (") |
| \? | question mark (?) |
| \\ | backslash (\) |
Inline features on-going.....
C++基础数据类型与关键字
本文详细介绍了C++的基础数据类型及其大小范围,并列举了C++的关键字,包括基本类型定义、流程控制关键字等,适合初学者快速了解C++的基本构成。
999

被折叠的 条评论
为什么被折叠?



