F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39394052_24440.cpp: In function 'int main()':
0_0_39394052_24440.cpp:11:37: error: no matching function for call to 'modf(__gnu_cxx::__enable_if<true, double>::__type, int*)'
   11 |         double fractionalPart = modf(n * log10(n), &n);
      |                                 ~~~~^~~~~~~~~~~~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:47,
                 from 0_0_39394052_24440.cpp:2:
gcc-13.1.0/x86_64-w64-mingw32/include/math.h:240:18: note: candidate: 'double modf(double, double*)'
  240 |   double __cdecl modf(double _X,double *_Y);
      |                  ^~~~
gcc-13.1.0/x86_64-w64-mingw32/include/math.h:240:41: note:   no known conversion for argument 2 from 'int*' to 'double*'
  240 |   double __cdecl modf(double _X,double *_Y);
      |                                 ~~~~~~~~^~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:382:3: note: candidate: 'long double std::modf(long double, long double*)'
  382 |   modf(long double __x, long double* __iptr)
      |   ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:382:38: note:   no known conversion for argument 2 from 'int*' to 'long double*'
  382 |   modf(long double __x, long double* __iptr)
      |                         ~~~~~~~~~~~~~^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:378:3: note: candidate: 'float std::modf(float, float*)'
  378 |   modf(float __x, float* __iptr)
      |   ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:378:26: note:   no known conversion for argument 2 from 'int*' to 'float*'
  378 |   modf(float __x, float* __iptr)
      |                   ~~~~~~~^~~~~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 16:45:24, Gzip enabled