I'm trying to connect to a file named accountTransactions.txt that is saved on my computer. I have set up an error trap that closes the program if the file doesn't connect properly. Everytime I try to run the program it says it can't connect to the input file and closes. When I comment the input file out and just leave the output file it connects fine. Anyone have any ideas?
infile.open("accountTransactions.txt");
if(infile.fail())
{
cout << "Input file (accountTransactions.txt) failed to open.";
exit(1);
}
outfileCheck.open("checkingSummary.txt");
if(outfile.fail())
{
cout << "Output file (checkingSummary.txt) failed to open.";
exit(1);
}