An assignment i was recently given requires us to take file input from the command line from 5 files named:
1. library_holdings_input_file 2. book_request_input_file
3. computational_task_1_output_file 4. computational_task_2_output_file
5. computational_task_3_output_file.
we are required to make a class "book" which consists of objects: catalog_number, last_name,first_name, title, genre, and the books availability and to assign the contents of the first file accordingly. for instance the file input will consist of a few lines of book information such as:
c1010 salinger J.D The_Catcher_in_the_Rye novel available
my instructor vaguely went over taking files from a command line and i'm lost in how to actually go about writing a code to preform this. so far this is my code
int main(int argc, char* argv[]){
if (argc != 5){
cout << "could not open the file ";
return(1);
}
ifstream infile;
infile.open("library_holdings_input_file");
while (!infile.eof){