I got this piece of code and I've been trying to take the result of this function and write to a file but everything I tried is just a failure. Is it possible to display this function in a file call customer.txt for example. Any help with this. Also, I read this
http://www.cplusplus.com/doc/tutorial/files/ but I don't get it, any advise to how to write and read from a file. thanks a lot.
void storeCustomer(CarCustomer arrCustomers[], CarCustomer carCustomer, int count)// I want to display in a file.
{
for (int index=0; index<count; index++)
{
cout<< arrCustomers[index].lastName << ","
<< arrCustomers[index].firstName << " \t"
<< setw(10)<< right<<fixed<< setprecision(2)<< arrCustomers[index].price <<"\t"
<< translateCarTypeToText(arrCustomers[index].CarType) << endl;