1
基本上我有这个代码,但是GCC抱怨矢量不能使用空类型构造 。有没有人遇到过这个问题 之前?我应该提到Vertex3D只能通过 这个文件中的指针来使用,所以整个编译器应该没有理由知道整个类型为 。我不知道模板在这方面的表现如何。模板参数是否需要前向声明或者是否需要知道类型定义
//#include "cgVertex3D.hpp"
#include "cgDirection3D.hpp"
#include "cgHandedness.hpp"
class Vertex3D; // Forward declaration to avoid mutual header include
class Polygon3D {
// Vertices constituting this polygon
vector<Vertex3D*> *vertices = NULL;
public:
...
你有'包括'和'使用命名空间标准;'somehwere? –
Mat
2012-02-22 18:52:08
GCC产生的错误究竟是什么? – vitaut 2012-02-22 18:55:42
**指针**的矢量对于像3D一样简单的3D顶点听起来很像Java。为什么不只是一个'矢量顶点'? –
2012-02-22 19:03:11