Question: Client program: Once you have created the BookList class, create a client program ( main ) called lab 2 . cpp . In your client
Client program:
Once you have created the BookList class, create a client program main called labcpp In your client program,
Create a BookList object.
Open and read from the "books.txt file only once! and populate the book list with all the book information read from file. The user must specify the file path for the data file; however, for testing, you can download the project files here: files.zip you will only be using "books.txt for this lab!
From P: Recommendations:
In order to grab each line ie string from a file, delimited by comma, you can use getline:
string filename "sometextfile.tx string str; ifstream infile; infile. open filename; whilegetlineinfile str cout str endl;
If a delimiter is not included parameters get ine will continue reading until it reaches a
character by default By including the third parameter, the get ine function will stop reading further input after
Previous
Next
Dashboard
Calendar
To Do
Notifications
Inbox
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
