SyntaxFix
Write A Post
Hire A Developer
Questions
Use this:
int ToggleNthBit ( unsigned char n, int num ) { if(num & (1 << n)) num &= ~(1 << n); else num |= (1 << n); return num; }