[cpp] #include <cstdlib> #include <iostream> using namespace std; int __sizeof() { unsigned int i = ~0; int count = 0; while(i) { i &= (i - 1); count++; } return count; } int main(int argc, char *argv[]) { cout << __sizeof() << endl; system("PAUSE"); return EXIT_SUCCESS; }