Help.. I got an exam coming up.. Can someone please help me with this question??

Class customer has a customer no and a name.
Function writeData() writes the number and name to the file customer. txt.
Function readData() reads and displays the customer name ACCORDING TO THE CUSTOMER NO. write an OOp
(1) Write the customer number and name in the given file.
(2) Read and display the customer name when the customer number
is given as an input.
Last edited on
Don't create multiple threads for the same topic. It wastes everyone's times, including yours.

Also, you've just dumped the text of your assignment in here. That's not helpful. We're not just going to write your code for you.

If you have a specific aspect of the assignment you're having trouble with, then tell us what that issue is. Show us what code you've written, and explain to us what's wrong.
This is a useful assignment; you should really try it. You've got full control over the writing of the file, so start there -- figure out how you want the file to look.

Hint: streams love when tokens are separated by whitespace
Hint2: ofstream (output) syntax is similar to cout
Hint3: ifstream (intput) syntax is similar to cin
Last edited on
Topic archived. No new replies allowed.