Quote:
Originally Posted by brad sue
`char Screen::pixels[4][5]' is private
I don't know why I have this error. it is like It cannot access it.
I tried to make friend class Rectangle in class Screen the I get a linker error.
Dont't know what to do here!
B.
|
That is what "private" means! It means only the Screen class can access the pixels member variable. Making Rectangle a friend class in Screen should get rid of the error, but may not be the best way to do things. As DaWei says, you need to post some more code.
Also note that
Doesn't actually do anything.