Memory access out-of-bounds while using std::cout
FurryR opened this issue · 1 comments
FurryR commented
mtheall commented
Yes this is because iostream is effectively "unbuffered" for the standard streams. You must output the entire escape sequence in a single operation for them to work. You can try std::ios_base::sync_with_stdio(false)
but I can't guarantee that the stream won't be flushed in the middle of these escape sequences. See https://en.cppreference.com/w/cpp/io/ios_base/sync_with_stdio for more information.