0

I've searched for questions asking this, I've seen many answers about opening the console that I'm showing on the screenshot, but all I see is the console of the command line debugger lldb, not the application's output.

enter image description here

Petruza
  • 10,275
  • 24
  • 74
  • 121
  • http://stackoverflow.com/questions/1716296/why-does-printf-not-flush-after-the-call-unless-a-newline-is-in-the-format-strin – Bryan Chen May 30 '14 at 05:07
  • I didn't know about the buffer not flushing, I though I was looking to the wrong console. – Petruza May 30 '14 at 05:58

1 Answers1

1

printf is line buffered and requires a \n or flush to force it to print the output.

If you change your code to include the following line after every printf it will work the way you want.

printf("something I want in the console");

// Either of the next two lines should work
putchar('\n');
fflush(stdout);
Alex
  • 1,955
  • 1
  • 14
  • 24