book library program

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


#include <fstream>;
#include <iostream>;
#include <cstdlib>;
#include <string>;
#include <stdio.h>;
using namespace std;

class book{
private:
string catalog_number, first_name, last_name, title, genre, availability;

public:
void set_book(string catalog_number, string first_name, string last_name, string title, string genre, string availability){
string catalog_number = catalog_number;
string first_name = first_name;
string last_name = last_name;
string title = title;
string genre = genre;
string available = availability;
};


};



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){

}

system("pause");
return 0;
};
Topic archived. No new replies allowed.