I am having trouble getting my program to compile without errors. I will post my source and the error that I get. Any ideas on where I went wrong? I am still new to C++.
Before C++11 the open function only accept c-strings (const char*) so you have to convert the std::string into a c-string using the c_str() member function: myfile.open(file.c_str());
I see a few things that look like they will cause problems.
First of all seeing as you are using strings you should add #include <string> to the top of your file.
Second to close the file you use .close() not .fclose. (Which your second compiler error points out)
Finally the argument of myfile.open() needs to be a const char* not a string. To convert a string to the right format you need to use .c_str() at the end of it (Which is what the first error is saying).
I would also suggest trying to use different things than system() to pause your program as it is not cross platform and is much more work for the compiler to do. Try looking into cin.get() or similar ideas.