精華區beta Programming 關於我們 聯絡資訊
bartler.bbs@star.ee.ttit.edu.tw (草) wrote: > 我想要列印某一浮點數到小數點下N位數如何設定 > 記得好像是:cout<<set???(N)<<x; cout << setiosflags(ios::fixed | ios::showpoint) << setprecision(N) << x; 還有要加上 #include <iomanip.h> 這句 directive。 ^_^