Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 then 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.

like image 418
user779439 Avatar asked Jun 01 '11 13:06

user779439


1 Answers

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

like image 196
uplearned.com Avatar answered Sep 30 '22 16:09

uplearned.com