??????????Щ??????????????????????????л?????????????????????????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();