1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
struct {int a; int b; int c;} d{1,2}; int b[10] = {1,2}; **sizeof数组** char p[] = "asdf";sizeof(p);结果是5,要多个空的结尾符号。 **static重复** static int d = 1; for (int i = 0; i < 2; i++) { static int d = 12; d += i; } cout << d; static int d = 4; { int d = 3; cout << d; } cout <<d; void () { static int number = 0; if (0 == number++) { cout << "ok"; } }
|
近期评论