ridiculous errors
helo
my program compiled just fine before, but now i get all 100+ rediculous errors, for example:
class camera
{
private:
//Camera vector location xyz
GLfloat vector[3];
//Camera vector angles xyz
GLfloat angle[3];
//Camera vector velocity variables
GLfloat velocity[3];
public:
GLfloat speedLimit;
GLfloat acceleration[3];
camera()
{
vector[] = {0.0f, 0.0f, -20.0f};
angle[] = {0.0f, 0.0f, -0.0f};
velocity[] = {0.0f, 0.0f, 0.0f};
acceleration[] = {0.0f, 0.0f, 0.0f};
speedLimit = .5f;
}
};
Errors:
C:\programming\opengl\environment\resources/cam.h(29) : error C2059: syntax error : '']''
C:\programming\opengl\environment\resources/cam.h(30) : error C2501: ''angle'' : missing decl-specifiers
C:\programming\opengl\environment\resources/cam.h(30) : warning C4244: ''initializing'' : conversion from ''const float'' to ''int'', possible loss of data (repeates 2 more times)C:\programming\opengl\environment\resources/cam.h(31) : error C2501: ''velocity'' : missing decl-specifiers
C:\programming\opengl\environment\resources/cam.h(31) : warning C4244: ''initializing'' : conversion from ''const float'' to ''int'', possible loss of data . . . .
and so on and so on, it pretty much goes through all of my variables. These are the first errors that show up (included before winmain()). I''ve tried putting all of my header files into one .cpp but got the same errors, and my code worked fine before. I''m on MSVC++ v4.0.
vector[] = {0.0f, 0.0f, -20.0f};
You can''t do that. Syntax error. You can only do this during initialization, i.e.
GLfloat vector[] = {0.0f, 0.0f, -20.0f};
You can''t do that. Syntax error. You can only do this during initialization, i.e.
GLfloat vector[] = {0.0f, 0.0f, -20.0f};
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement