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 lab2.cpp. 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: p1 files.zip (you will only be using "books.txt" for this lab!)
From P1: Recommendations:
In order to grab each line (i.e. string) from a file, delimited by comma, you can use getline():
string filename = "sometextfile.tx string str; ifstream infile; infile. open (filename); while(getline(infile, str,',')){} cout str endl;
If a delimiter is not included (2 parameters), get l ine will continue reading until it reaches a '??
' character (by default). By including the third parameter, the get l ine function will stop reading further input after
4 Previous
Next
Dashboard
Calendar
3
To Do
Notifications
Inbox
 Client program: Once you have created the BookList class, create a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!