Xcode 中 scanf 函数无法控制台输入,求教
xcode吧
全部回复
仅看楼主
level 1
如图求一个最大公约数,没有报错,自动跳过了 scanf 函数的输入,直接进入下面一行,求大神指点原因
2017年06月05日 23点06分 1
level 12
NSLog含的换行符被scanf函数吃了,就像你用printf函数后面加/n一样。
2017年06月18日 04点06分 2
level 1
rewind(stdin); 记得得清楚下缓存区
2017年07月24日 13点07分 4
1