## 基礎概念 <iomanip> 是 C++ 標準函式庫中的標頭檔,提供了 格式化輸出(formatted output) 的功能。它的名稱來自 "input/output manipulators",常用來控制 cout 的輸出格式。 這個標頭提供了一些特殊的 操作器(manipulators),可以修改輸出數值或文字的顯示方式,如寬度、對齊、小數點精度等。 ## 作用 - 設定輸出欄位寬度 - 控制浮點數的顯示精度 - 設定整數或浮點數的進位制(如十六進位) - 設定對齊方式(靠左、靠右) - 顯示前綴(如 0x、+ 號) - 設定填充字元(例如用 * 填滿寬度)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up