【发布时间】:2016-02-24 04:09:54
【问题描述】:
这是我的类(网格)的头文件
#ifdef MESH_H
#define MESH_H
#include <glm\glm.hpp>
#include <GL\glew.h>
class Vertex
{
public:
Vertex(const glm::vec3& pos)
{
this->pos = pos;
}
protected:
private:
glm::vec3 pos;
};
class Mesh
{
public:
Mesh(Vertex* vertices, unsigned int numVertices);
void Draw();
virtual ~Mesh();
protected:
private:
Mesh(const Mesh& other);
void operator = (const Mesh& other);
enum
{
POSITION_VB,
NUM_BUFFERS
}
GLuint g_vertexArrayObject;
GLuint g_vertexArrayBuffers(NUM_BUFFERS);
unsigned int g_drawCount;
};
#endif
这是我得到的主要错误。所有其他错误都基于这个错误。
Error 1 error C2653: 'Mesh' : is not a class or namespace name
请帮助我,因为这没有任何意义,因为我已将“网格”明确定义为一个类。谢谢
【问题讨论】:
-
哪一行有错误?
-
当我使用 Mesh::Mesh() 时我的 cpp 文件的行{}
-
是的,我确实在 cpp 文件中包含了标题
-
显示 cpp 文件。那是
C2653编译过程中的第一个错误吗? -
是的,这是编译过程中的第一个错误
标签: c++ visual-studio class compiler-errors