If you want class Rectangle to be a friend class to Screen, put
inside screen.
You will need to tell the compiler that Rectangle is a class before you try use it as a friend. This is called forward declaring. Put
before the Screen class declaration.
A better idea might be that the Rectangle class should be using the Screen class setPoint member function instead of jumping into the internals of the Screen class.
Also note that this line in setPoint
Is setting the pixel to the constant 'c', not the value of the c parameter.