int main(int argc, const char * argv[]) { Solution s; s.Toggle(2, 5); s.Toggle(6, 9); s.Toggle(1, 8); s.Toggle(7, 10); for(int i = 0 ; i <= 10; i++){ bool rs = s.isToggle(i); if(rs) cout << "true" << endl; else cout << "false" << endl; } return 0; }