Mam klase gwiazdy ale sa bledy przy kompilacji...
Star::Star(float xpos, float ypos, float zpos)
{
x = xpos;
y = ypos;
z = zpos;
}
Star::~Star()
{
}
void Star::SetPosition(float xpos, float ypos, float zpos)
{
x = xpos;
y = ypos;
z = zpos;
}
void Star::SetColor(float red, float green, float blue)
{
r = red;
g = green;
b = blue;
}
No i przy:
Star gwiazda(0.0f, 5.0f, 0.0f);
gwiazda.SetColor(1.0f, 0.0f, 0.0f);
pojawiaja sie bledy:
error C2143: syntax error : missing ';' before '.'
error C2501: 'gwiazda' : missing storage-class or type specifiers
error C2371: 'gwiazda' : redefinition; different basic types
see declaration of 'gwiazda'
error C2143: syntax error : missing ';' before '.'
Wszystkie sredniki sa i nie wiem czemu sa bledy i co one oznaczaja. powiedzcie co zle napisalem...?