【发布时间】:2019-07-14 06:29:26
【问题描述】:
我正在尝试从我的班级返回一个结构向量,但遇到了一些错误。这是我到目前为止的设置:
class trial{
public:
struct coords{
double x,y,z;
};
vector<coords> trial::function(vector <double> x1, vector <double> x2);
};
std:vector<coords> function(vector <double> x1, vector <double> x2){
some math.....
vector <coords> test;
return test;
}
错误出现在 st::vector.... 说 coords 没有定义。有什么想法吗?
【问题讨论】:
标签: c++ function c++11 function-prototypes