目前手头上有个触碰传感器,有0和1两个状态,我需要一个程序能让它,碰一下进行一个程序,再碰一下停止,求大神教教
1 回答
已采纳

墨客莫科
TA贡献2条经验 获得超0个赞
bool sta=true; int input; while(cin>>input) { if(sta==true) { do something; sta=false; } else { do something; sta=true; } }
- 1 回答
- 0 关注
- 1211 浏览
添加回答
举报
0/150
提交
取消