This could probably belong on Stackoverflow but I'm not sure.

I want to change some variables that are in my game loop from different classes, this is probably a simple question with something i'm overlooking but I can't think how to do it easily.

The only way I can think to do is pass a pointer to whatever class I want to change it in, but that seems stupid as if I want to do something else it means passing another pointer.

Any ideas to help me?