've been looking for so long trying to figure out how to get this thing to work. All i need to do is ask user to input a name and then it brings out the line from the .txt file containing the information.
For example in my case I'm doing a member search function I'm required to ask user to input the name of the customer and then print out all the details (which consumes 1 text line in the .txt file)
Here is the code, any help would be greatly.. GREATLY appreciated!
This is the write to text file method (100% working)
cout << "Customer Name: ";
cin >> name;
ofstream myfile("customer.txt", ios::app);
myfile << " ID: " << id << " Name: " << name << " NICN : " << nicn << " gender : " << gender << " Day : " << day
<< " Month : " << month << " Year : " << year << " Status : " << status << " Charges : " << charges << endl;