This is the code that the application is using to read the file and I have to modify it
1) do not read empty lines (especially the empty line at the end)
2) error when file does not exist
3) error when file does not open
4) error when file is empty
string pathFile = fpath + "/test.log";
LOG("Failed to open test.log file");
while(getline(f1,line)) // reading line by line
// do something
when I delete the file i-e make it non-existent then it shows the following error
terminate called after throwing an instance of 'std::out_of_range'
Aborted (core dumped)
I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...