My code is having a error. the error is expected unqualified-id before [ token#include at 180:1
please fix the code so it will run in c++ #include #include #include #include #include #include using namespace std; struct Person { string firstName; string lastName; string phoneNumber; }; struct Address { string street; string city; string state; int zip_code; }; struct Customer { Person person; Address address; }; void OpenInputFile(ifstream&); void OpenOutFile(ofstream&); void PrintHeadingOutput(ofstream&); void PO(Customer&, ofstream&); bool RIF(Customer&, ifstream&); int main() { ifstream inFile; ofstream outFile; Customer info; OpenInputFile(inFile); OpenOutFile(outFile); PrintHeadingOutput(outFile); while(RIF(info,inFile)) { PO(info,outFile); } if (inFile.fail() && !inFile.eof()) { string infilename; cout<<" Processing information. Please wait...."< An error has occured while reading "; cout << "==> the input file. Error in file content " << infilename < Terminating program!!!"<> infilename; cin.ignore(INT_MAX,' '); cout << infilename << endl; inFile.open(infilename.c_str()); while (inFile.fail()) { cout << endl << string(15,'*') << "File Open Error"< Input file failed to open properly!! "; cout << "==> Attempted to open file: " << infilename < Please try again... "; cout << string(47, '*')<< endl<> infilename; cin.ignore(INT_MAX,' '); cout << infilename << endl; inFile.open(infilename.c_str()); }
} void OpenOutFile(ofstream& outFile) { string outfilename; cout << " Enter name of output file:"; cin >> outfilename; cin.ignore(INT_MAX,' '); cout << outfilename << endl; outFile.open(outfilename.c_str()); while (outFile.fail()) { cout << endl << string(15,'*') << "File Open Error"< Output file failed to open properly!! "; cout << "==> Attempted to open file: " << outfilename < Please try again... "; cout << string(47, '*')<< endl<> outfilename; cin.ignore(INT_MAX,' '); cout << outfilename << endl; cout<<" Processing information. Please wait...."<> info.address.zip_code; inFile.ignore(INT_MAX,' '); getline(inFile, info.person.firstName,' '); return bool(inFile); } void PrintHeadingOutput(ofstream& outFile) { outFile << setw(7) << left <<"Entry"<