求助构造函数
  • 板块学术版
  • 楼主vectorwyxSD省选加油
  • 当前回复21
  • 已保存回复21
  • 发布时间2020/5/1 21:54
  • 上次更新2023/11/7 03:26:07
查看原帖
求助构造函数
238408
vectorwyxSD省选加油楼主2020/5/1 21:54

RT,请问我这样写为什么会报错?谢谢!

const int maxn=1e4+5;
struct Edge{
	int to,next;
	Edge(int x,int y){to=x;next=y;}
}e[maxn];
int head[maxn],tot;

void connect(int u,int v){
	e[++tot]=Edge(v,head[u]);//编译标红了这里
	head[u]=tot;
}
2020/5/1 21:54
加载中...