I added some test code for my openfile function and my closefile function and they are not reading back anything. Obvious this is why my file isn't being opened or written to. Any help would be awesome, would love to finish this program off.
Verbally I don't think I am understanding correctly but I will try to explain. The verbage for class and objects is still a bit vague to me but I thought openOutputfile is just the name of the void member function. So I thought that I needed to actually make a call either engineReport or whatever that actually opens a file.
Your questions make me think that your asking why didn't I just use openOutputFile, to which I would ask why would it matter if that is just a void member function of the class mycar?
But I don't see anywhere that the function openOutputFile() is being called.
If it was a public member function, you could call it from main(), just before the call to outputReport(). But it is better the way you have it now, it is private, so you must call it from within another member function. A good place would be at the start of outputReport (about line 214), before attempting to write anything to the output file, first open it.
Though after you have solved the current issue, you might consider some reworking of the code, to remove what is almost two sets of identical code within function outputReport. But that's a separate topic.
That was the part i didn't understand I made the edit and now it opens the output file but isn't writing correctly to it. I will debug it and see what I can find but you helped me get the output file to open, thanks a ton.
Thanks a lot chervil, I figured out my problem I did another ofstream down in the function and it was overwriting my private variable ofstream. I removed it and everything works.