0_0_35062527_18061.cpp: In function 'int main()': 0_0_35062527_18061.cpp:48:28: error: 'p' was not declared in this scope if( key == 1 ) p++;//只有开关打开的同学才能被计数 ^ 0_0_35062527_18061.cpp:50:9: error: 'p' was not declared in this scope cout<<p<<endl; ^