2019年1月28日 星期一

C++ 清空console畫面文字的做法

void clear() {
    // CSI[2J clears screen, CSI[H moves the cursor to top-left corner
    std::cout << "\x1B[2J\x1B[H";
}
https://stackoverflow.com/questions/6486289/how-can-i-clear-console

沒有留言:

張貼留言