I'm taking a intro to programming class. I've got a program that has 4 functions that need to write a statement in the outfile. I can't recall ofstream in each function, so I've been told to either declaring and initializing ofstream as a global variable, or pass it in each function. When I do either though, I get a crapload of errors.
Anyone know what I might be doing wrong? Or is there a better way to do this?