gpt4 book ai didi

c++ - 我应该使用哪个头文件而不是#include

转载 作者:塔克拉玛干 更新时间:2023-11-03 08:21:11 27 4
gpt4 key购买 nike

<分区>

#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");
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com