This is for final project and this is last part that needs completed, I don't understand why its giving me problems. It is fine except for this one part of the code.
Code:
system("cls");
system("color 8A");
char runAgain;
tripEntry travels[100];
int counter = 0;
do
{
do
{
cout << "Enter the trip ID number: ";
cin >> travels[counter].ID;
cout << "Enter the distance traveled on " << travels[counter].ID << ":";
cin << travels[counter].distance;
cout << "Enter the amount you are reimbursed per mile." << endl << " (I.E. 0.25 for 25 cents) ";
cin >> travels[counter].reimburse;
cout << "Add another trip? [Y/N] ";
cin >> runAgain;
counter++;
runAgain = toupper(runAgain);
}while(runAgain == 'Y');
system("cls");
print_Top();
cout << VTUBE << " Trip ID Miles $/Mile Reimburstment " << VTUBE << endl;
print_Mid();
for (int count =0; count<counter;count++)
cout << VTUBE << setw(8) << travels[count].ID << setw(10) << travels[count].distance << setw(6) << "$" << setw(5) << travels[count].reimburse << setw(12) << "$" << setw(6) << travels[count].distance * travels[count].reimburse << setw(2) << VTUBE << endl;
print_Bottom();
cout << "Do you want to make another? ";
cin >> runAgain;
runAgain = toupper(runAgain);
}while (runAgain =='Y');
I have tried making HANDLE's to send it out specifically.
I have to use ifstream and ofstreams in another part of the program, but don't seem to have an impact on any other parts.
The errors I get are:
Error 32 error C2784: 'std::basic_ostream<_Elem,_Traits> &std:perator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'std::istream'