Basically I'm supposed to write a program that asks for two file names, an input and an output file. The program then reads the input file and makes substitutions for the file to say something totally different in the output. I'm having trouble writing some of the functions, specifically where I'm trying to get it to open the file location at infile.open(location);. Could anyone point me in the right direction?
What do you mean by having trouble? Also, you could just have return check, but that wouldn't change the end logic.
Edit: using cstrings shouldn't be necessarily.
Also, I just tried out the program and it seems to work fine, it copied the contents of the first file to the second.
You might be doing something with the files that your OS doesn't like, make sure they're closed first.