String object

1. The following I want to use to input the file names in a CLR Windows Form program. Input is a String object.

Property to access the text in the edit box
public: property String^ InTextString
{
String^ get() {return myInfileText->Text; }
void set(String^ inText) {myInfileText->Text = inText; }
}

//Property to access the text in the edit box
public: property String^ OutTextString
{
String^ get() {return myOutfileText->Text; }
void set(String^ outText) {myOutfileText->Text = outText; }
}


2. The follow works in my program for the file input and output. The file names are written into the program.

ifstream myInfile ("inText.txt");
ofstream myOutfile ("outText.txt");

3. What I want to do is to be able to input the file names in the text boxes as in #1 above, and not write them into the program as outlined in #2 above. I have tried all sorts of string conversions and nothing works. What do I have to do to be able to use the text boxes in #1 above?

I can be reached at kolancer1963@gmail.com
Any reason you don't want to use the File I/O capabilities provided by .NET?
Topic archived. No new replies allowed.