Edges ele; ele.index_begin = 10; ele.index_end = 20; ele.weight = 30; std::cout << "edges " << i << " : " << edges << std::endl;
[quote=引用 5 楼 StrugglePeach 的回复:] [quote=引用 4 楼 sdghchj 的回复:] [quote=引用 3 楼 StrugglePeach 的回复:] 这种写法应该不行吧?我试了一下还是报错,提示Y does not name a type 如果这种可以用那就方便了
[quote=引用 4 楼 sdghchj 的回复:] [quote=引用 3 楼 StrugglePeach 的回复:] 这种写法应该不行吧?我试了一下还是报错,提示Y does not name a type 如果这种可以用那就方便了
[quote=引用 3 楼 StrugglePeach 的回复:] 这种写法应该不行吧?我试了一下还是报错,提示Y does not name a type 如果这种可以用那就方便了
这种写法应该不行吧?我试了一下还是报错,提示Y does not name a type 如果这种可以用那就方便了
都C++了,有必要去typedef struct X{ } Y吗? struct Y{ friend std::ostream& operator<<(std::ostream&, const Y& ){ } }
65,210
社区成员
250,518
社区内容
加载中
试试用AI创作助手写篇文章吧