作者sjgau (sjgau)
看板C_and_CPP
標題[問題] C++ 不支援 %lf ?
時間Tue May 29 13:35:42 2012
cc1plus: warnings being treated as errors
In function 'int main(int, char**)':
Line 26: warning: ISO C++ does not support the '%lf' printf format
Line 26: warning: ISO C++ does not support the '%lf' printf format
要如何 更正,才能 消除上面的
warning?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 42.72.64.151
推 suhorng:%f 05/29 13:48
推 Yshuan:這應該是C的事情... 05/29 17:06
→ diabloevagto:C++不是都用cout了嗎? 05/29 21:25
推 lovesnake:include cstdio ? (不懂亂答) 05/30 12:28
推 lmr3796:%f 05/30 22:16
推 VictorTom:printf時用%f就可以了, scanf時才用%lf....@_@" 05/30 23:46
→ xatier:樓上正解 05/31 04:03