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
You can make a difference in the Apple Support Community!
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
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
Oop, meant Cplusplus there.
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.
Escape Sequences in Xcode C++