Global variables? Bad! Yes, but to what extent?
I have not so much a question of code knowledge, but one for someone with lots of experience in managing a project.
So far, most people I read from say that global variables are a bad idea that clog up your project as it grows. Would it, however, not be a good practice to keep one, and just one header file (named accordingly, like globals.h) to hold (for example) 5 global pointers to the 5 class instances that together control the flow of the program and that also need to be accessed from everywhere in the program?
A bit more substantial: right now, I have a logfile class, and I need to be able to send a message to (call a function for) this class from everywhere in the program, but it seems idiotic to pass a pointer to every single function in the program to keep track of a single object. So, would a global pointer be a good idea here, or should they be avoided altogether?