When using the scanf input function in the Xcode 4 debugging console

Here is the problem. When I use debugging (GCC) in Xcode 4. It seems that I cannot enter a number in the debug console if I use "scanf" in my program. I have to add a "/" after the number, after which it can act as usual. Just like the solution presented in How to enter standard input into the Xcode debugger console . Adding a slash after the desired input number does not make sense.

For example: If the program is something similar:

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

Then, when he ran to the line, I need to dial "123 /", or he will not give me an answer.

Does anyone encounter the same issue? Is there a solution to solve the problem and make it the same as working in a standard console environment.

+5
source share
1 answer

You need to press shift+ enterfor it to work.

+10
source

All Articles