Changing the background color

This is my first program in my graphics class. I have to create a window that changes color every time the ‘c’ key is struck.

I have everything I need, including the keyboard function (with switch). I have it working so that the program ends when the esc key is struck.

My problem is that I don’t know how to actually change the color of the background. I’m supposed to use glClear in the keyboard function, but how?

HELP!

Have a look at glClearColor().