run time calculator c++
#include <iostream>
#include <fstream>
#include "header.h"
#include <queue>
#include <bitset>
using namespace std;
bool checkInputFile(ifstream &input) { //checking if the file is found and opened or not.
if (!input) {
return 0; //returning 'false'.
}
else {
cout << "Input file has found !" << endl; //if the target file has been opened , prints a success message.
return 1; //returning 'true'.
}
}
bool isEmpty(string s) {
if (s.size() == NULL) { //if there is no element in the given file , information message will be printed and function will return 'true'.
cout << "Input file is empty." << endl;
return true;
}
else {
cout << "\nContent of the input file : " << s; //if file isn't empty , information about the file will be printed and function will return 'false'.
return false;
}
}