class outside { int x; class inside { void func() { x = 0; }; // x is not a member of outside::inside }; }; xをoutside::xにしたり、friend class outside;つけたりしましたがダメっぽいですよ。
unsigned short fadd_bit(unsigned short x, const unsigned short b) { if (x & b) { x = fadd_bit(x, b<<1); x &= ~b; } else { x |= b; } return x; } unsigned short fadd(unsigned short x, unsigned short y) { while (y) { unsigned short yy = y&~(y-1); y ^= yy; x = fadd_bit(x, yy); } return x; }