Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试pointT从Vector<int>坐标创建一个新的类型对象。这是我的教程引导我的地方,但我得到了它无法将 int 转换为object pointT. setWall期望(a,b, bool)wherea和bare 的类型pointT。
pointT
Vector<int>
object pointT
setWall
(a,b, bool)
a
b
如果这不是方式,我如何xy从我的向量构建?
xy
谢谢
pointT xy = { coords[0], coords[1] }; m.setWall(xy.col, xy.col, false);}
尝试这个:
struct point_t { int x; int y; point_t(const Vector<int>& v) :x(v.x), y(v.y) {} }; point_t a(vecA); point_t b(vecB); m.setWall(a, b, false);