10??C++??????????????
???????????? ???????[ 2015/1/5 11:16:38 ] ????????C++ net
??????????Щ??????????????????????????л?????????????????????????C++?????????????????????????????10????????C++???????????????£?C++??????????????????£???????????6???????????????????????????????????????????????Σ?????ú???????????????????????漰?????????C++?????б??????С???? ??
???????????????
???????o???????32 bit??foo(2^31-3)??????????
????int foo(int x)
????{
????return x&-x;
????}
????A??0 B: 1 C: 2 D: 4
??????????????
????unsigned char i=0x80;
????printf("0x%x
"?? ~i>>3+1);
???????????
????????????????ù???????
#include <iostream>
using namespace std;
class A
{
public:
A() { cout << "A's Constructor Called " << endl; }
};
class B
{
static A a;
public:
B() { cout << "B's Constructor Called " << endl; }
};
int main()
{
B b;
return 0;
}
|
????union????
#include <stdio.h>
union
{
int i;
char x[2];
}a;
int main()
{
a.x[0] = 10;
a.x[1] = 1;
printf("%d"??a.i);
return 0;
}
|
?????????????????????
????class A {
????public:
????int m;
????void print() { cout << "A
"; }
????};
????A *pa = 0;
????pa->print();
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11