久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

倒帶 std::cout 回到行首

Rewinding std::cout to go back to the beginning of a line(倒帶 std::cout 回到行首)
本文介紹了倒帶 std::cout 回到行首的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在為 Mac OS X 編寫一個命令行工具來處理一堆文件.我想向用戶展示當前正在處理的文件,但不希望大量文件污染終端窗口.

I'm writing a command-line tool for Mac OS X that processes a bunch of files. I would like to show the user the current file being processed, but do not want a bazillion files polluting the terminal window.

相反,我想使用一行來輸出文件路徑,然后將該行重復用于下一個文件.是否有一個字符(或其他一些代碼)輸出到 std::cout 來完成這個?

Instead I would like to use a single line to output the file path, then reuse that line for the next file. Is there a character (or some other code) to output to std::cout to accomplish this?

另外,如果我想將此工具重新定位到 Windows,兩個平臺的解決方案是否相同?

Also, if I wanted to re-target this tool for Windows, would the solution be the same for both platforms?

推薦答案

" " 應該適用于 Windows 和 Mac OS X.

" " should work for both windows and Mac OS X.

類似于:

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

這篇關于倒帶 std::cout 回到行首的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How do I set the icon for my application in visual studio 2008?(如何在 Visual Studio 2008 中為我的應用程序設置圖標?)
Convert CString to const char*(將 CString 轉換為 const char*)
Remove secure warnings (_CRT_SECURE_NO_WARNINGS) from projects by default in Visual Studio(默認情況下,在 Visual Studio 中從項目中刪除安全警告 (_CRT_SECURE_NO_WARNINGS))
How do I start a new CUDA project in Visual Studio 2008?(如何在 Visual Studio 2008 中啟動新的 CUDA 項目?)
Exporting classes containing `std::` objects (vector, map etc.) from a DLL(從 DLL 導出包含 `std::` 對象(向量、映射等)的類)
What are some reasons a Release build would run differently than a Debug build(發布版本與調試版本的運行方式不同的一些原因是什么)
主站蜘蛛池模板: 精品成人av | www.久| 日韩精品成人 | 伊人春色在线观看 | 精品国产鲁一鲁一区二区张丽 | 国产在线观看一区 | 黑人性hd| 玖玖视频国产 | 久久精品网 | 久久91av | 成人国产精品一级毛片视频毛片 | 成人国产精品入口免费视频 | 国产精品亚洲综合 | 午夜欧美一区二区三区在线播放 | 日韩欧美国产精品一区 | 先锋资源网 | 亚洲男人天堂2024 | 99久久免费精品国产免费高清 | 精品国产一区二区三区免费 | 亚洲国产一区二区三区四区 | 国产亚洲一区二区三区在线观看 | 亚洲欧美日韩电影 | 亚洲综合资源 | 亚洲欧美一区二区三区情侣bbw | 国产高清在线观看 | 久久狠狠| 97精品超碰一区二区三区 | 欧美嘿咻 | 最新黄色毛片 | 国产三级在线观看播放 | 九九亚洲精品 | 国产无人区一区二区三区 | 成人免费在线视频 | 日韩精品av| 欧美黄色大片在线观看 | 97精品国产 | 成人h动漫精品一区二区器材 | 午夜免费精品视频 | 男插女下体视频 | 欧美阿v | 在线国产一区二区 |