Course Solutions Uncategorized (Solved) : Object Oriented Programming C Output Program File Called Simtxt Simulation Function Obvio Q27590061 . . . .

(Solved) : Object Oriented Programming C Output Program File Called Simtxt Simulation Function Obvio Q27590061 . . . .

 

Object-Oriented Programming C++ – I have to output my program toa file called “sim.txt”. My simulation is a function obviously soI’m not able to do a thing like:

std::ofstream outputFile;

outputFile.open(“sim.txt”, std::ios::out);

outputFile << runSimulation(franchises,days);

outputFile.close();

Because I then get the error that is that the operator <<does not recognize an ofstream to a void function.runSimulation also has anotherprint function nested within it calledprintRundown that runSimulationcalls once per day.

Signatures for printRundown andrunSimulation:

void runSimulation(std::vector<HotdogStand>&franchises, int days);

void printRundown(conststd::vector<MyAwesomeBusiness::HotdogStand>&franchises);

I’d prefer you to overload the operator << to make ithappen, but if there is a way that you know of that is easier thenplease do go with that. I’m

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post