[B]declaration of glMaterialfv's content ![/B]

I declared
GLfloat RedSurface[]={1.0f,0.0f,0.0f,1.0f};
to use it with
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, RedSurface).

How am I suppose to use the variable correctly to get no copmpile error ? :eek:

These lines give me no compile error with DevC++.

What is your error and compiler ?

Are you sure the error is not due to a missing semicolon, error on the previous line? There is really not much information here to go on, it looks ok. Did you remember to include gl.h?