Escape Sequences in Xcode C++

Hello! I am trying to use the escape sequences \b and \a in my C Xcode file, but the output is just an upside down question mark. Is there a way to get Xcode to work with these?

Xcode-OTHER

Posted on May 30, 2012 7:04 PM

Reply
2 replies

May 31, 2012 7:43 AM in response to Luigi777

It seems to work fine.

#include <stdio.h> #include <unistd.h> int main(void) { printf("Hello"); fflush(stdout); sleep(10); for(int i = 0; i < 5; ++i) { printf("\b \b"); fflush(stdout); sleep(2); } printf("Hi\n"); sleep(10); printf("Time to go home!\n\a"); return 0; }

Escape sequences like that might not work inside the Xcode debugger console. Run it from the Terminal.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Escape Sequences in Xcode C++

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.