I have an ErrorLog
class, that is used to write and modify log files. I'd like to write to it before and after major events for debugging purposes and I only want to use one instance of the ErrorLog
class for the entire application. I tried declaring an ErrorLog
object as a global by placing
ErrorLog exe_log;
into a header file so it is accessbile to other files, but I keep getting an error saying it is already defined. Is there a correct way to defing global objects?