This is so far what ive done for the c++ part. although, its confusing, becoause i dont know how 2 connect my log.txt file which has the customers tag_number, date, time, and toll with the customer.txt which has the tag_number, and customer details e.g address phone etc.. i dont know what to do with the strings.. plz help
#include
#include
#include
#include
#include
void PrintCustomerStatement()
{
sting tag_number, date, time, toll_station;
char duration[25];
amountDue = 0;
string tagNo = tag_number;
PrintCustomerStatement();
fstream InStream("log.txt", ios::in); // open file
if (InStream.fail()) // check for success
{
cerr << "\n Unable to open 'customer.txt'!\n";
exit (-1);
} // end if
while (!InStream.eof()) // while not end-of-file:
{
InStream >> tag_number; // input tag number
InStream >> date;
InStream >> time;
InStream >> toll_station;
if (tagNo == tag_number)
{
amountDue = PrintCustomerStatement(tag_number, date, time, toll_station);
// invoke subordinate module
totalAmountDue = totalAmount + amount;
} // end if
} // end while
int strcmp (const char*s1, const char*s2)
cout << "Enter Customer ID:";
cin >> customer_id;
int strcmp (customer_id, cust_id)
if customer_id = cust_id
{
// Function Print Customer Statement
void PrintCustomerStatement(){
cout << "\nEWAY BILL E-way Motorway\n"
<< " "<