vscode上我写了一段代码,但为啥我已经引入了<bits/stdc++.h>,如果不加#include就会报红,但明明不加也可以编译运行
#include <bits/stdc++.h>
#include<unordered_set>
using namespace std;
using pi = pair<int,int>;
bool operator==(const pi& a, const pi& b) {
return a.first == b.first && a.second == b.second;
}
struct myhash
{
std::size_t operator()(pi const& a) const
{
return a.first ^ a.second;
}
};
int main(){
unordered_set<pi,myhash>s;
s.insert({1,2});
int a;
return 0;
}
如图,非要加这个头文件才不红,但加不加都能运行