开发者

When using input function "scanf" in Xcode 4's debugging console

Here is the problem. When I am using the debugging (GCC) in Xcode 4. It seems I can't input a number in debugging console if I use "scanf" in my program. I have to add a "/" after the number 开发者_StackOverflowthen it can act as usual. Just like the solution provided in How to Enter Standard Input in Xcode Debugger Console. Appending a slash after a desired input number does not make sense.

For example: If the program is something similar:

...
int num;
scanf("%d", &num);
...

Then when it ran to the line, I have to type "123/", or it won't give me any response.

Does anyone meet the same problem? Is there any solution to solve the problem and make it just like running in standard console environment.


You have to press shift + enter for it to work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜