<分区>
#include <iostream>
#include <string>
#include <sstream>
//#include <bits/stdc++.h>
#include <iomanip> // std::setprecision
#include <math.h>
using namespace std;
我想删除标题 #include <bits/stdc++.h>
,因为它显着减慢了我的编译时间。
当我删除它时,出现以下错误:
error: cannot convert ‘long double*’ to ‘double*’ for argument ‘2’ to ‘double modf(double, double*)’
fractpart = modf(val, &intpart);
我认为问题出在缺少头文件,但不知道是哪一个。
我收到错误的代码是:
fractpart = modf(val, &intpart);
if (fractpart != 0) {
throw Error("ERR");
}