Text Box used for filename input

I've written a program that's complete except the input and output file names are encoded in the program like this:ifstream myInfile ("ReadText.txt");
ofstream myOutfile ("SaveText.txt");, but I want to use a Text Box on a Windows Form to input the file names at runtime. But, everything I've tried has errored out, mostly std::basic_string<_Elem._Traits._Ax>. Evidently the file names for ifstream and ofstream are some other kind of string. Any ideas how I can fix this?
ifstream takes a const char*
http://www.cplusplus.com/reference/fstream/ifstream/ifstream/

If you are using std::string in your GUI you want to look at:
http://www.cplusplus.com/reference/string/string/c_str/

input and output file names are encoded

What do you mean by 'encoded'?
Topic archived. No new replies allowed.