I need help displaying the number of tasks for an event from the text file that I have created and input into my program. Please help! I'm posting the code in here.
#include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;
void header();
void footer();
int convert(int);
int pnum = 0;
const int width = 22;
const int SENTINEL = 0;
int main()
{
ifstream infile;
infile.open("CritPath.txt"); // associate “testdata.txt with infile
// Important to check if file exists
if (!infile)
{
cerr << "File could not be opened\n"; //display error message
exit(1); // end program