|Online Judge||Problem Set||Authors||Online Contests||User|
ISO C-conformant printf format specifiers
In Reply To:pick 定理+边上的顶点数 恩 学习了 ，不过为什么代码C++能过G++过不了？大牛们能帮我看下吗 Posted by:abilitytao at 2009-08-10 22:45:07
Prior to the compiler upgrade in May 2009, we serviced C and C++ submissions using GCC 3.4.2. That version of GCC relies on the old MS VC++ 6 runtime library, which does not support the %lld and %llu specifiers for signed and unsigned long long types but allows the standard-incompliant %lf and %lg specifiers for floating-point types. The new GCC 4.4.0 comes with its own ISO C-conformant implementation of the printf function. Now you can use %lld and %llu with either C/C++ compiler, but %lf and %lg only work with MS VC++ 2008 Express. As a rule of thumb, you should always use the %f and %g specifiers instead for floating-point types.
Post your reply here:
Home Page Go Back To top
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator