关于bitset
  • 板块学术版
  • 楼主ljy05
  • 当前回复10
  • 已保存回复10
  • 发布时间2023/10/8 16:49
  • 上次更新2023/11/2 14:55:40
查看原帖
关于bitset
629740
ljy05楼主2023/10/8 16:49

为什么这段代码会报错?

#include<bits/stdc++.h>
using namespace std;
bitset<1000010> dp;
int main(){
	printf("%d",dp[1]);
	return 0;
}
//[Error] cannot pass objects of non-trivially-copyable type 'class std::bitset<1000010ull>::reference' through '...'

这样却不会报错?

#include<bits/stdc++.h>
using namespace std;
bitset<1000010> dp;
int main(){
	cout<<dp[1]<<endl;
	return 0;
}
2023/10/8 16:49
加载中...