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
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++