草庐IT

GetTankPosition

全部标签

C++ 非静态成员引用必须相对于特定对象

Vector2DtankPos=Tank_b017191c::GetTankPosition();我试图从不同的类调用一个函数,但我收到了这个错误:47IntelliSense:anonstaticmemberreferencemustberelativetoaspecificobjecte:\Repos\GameAI\GameAI\PathFinder_b017191c.cpp11321GameAI我已将Tank_b017191c.h包含在我的头文件中,但还不够.. 最佳答案 似乎成员函数GetTankPosition是一个非静态