Carriage Return Mismatch with Xcode

I'm having a problem using carriage return to rewind to the beginning of a line in Xcode.

This small example:

std::cout << "will not see this\rwill see this" << std::flush;
std::cout << std::endl; // all done

compiled in Xcode, leads to:

won't see it

will see it

whereas when I compile it in the terminal using g ++, I get:

will see thisthis

How can I get Xcode to show the latest (and expected) behavior?

welcomes Daniel

+3
source share
1 answer

, Xcode , ? . Xcode gcc , , . ( , , ) , , \r, .

+1

Source: https://habr.com/ru/post/1771341/


All Articles