opening file !!help me
-
Hi I posted a message yesterday as well but i dont still get it what should i do.... it is very simple.. but i have never worked with forms and i only know about consule project. iostream!! I am trying to build a form and run a specific application with it. I am already made the project as a console project using fstream. I want to get the name of the file from the user in a specific text Box and then open it as follows: char fileName[]; ifstream infile; infile.open(fileName); However what i get from the textbox is String *f = textBox->Text; How can i convert this to char[]? I have already tried char fileName[]=f->ToCharArray(); but it seams there is a problem and i cant convert _wchar to char!! how can I do this? is there another way to open the file ?
-
Hi I posted a message yesterday as well but i dont still get it what should i do.... it is very simple.. but i have never worked with forms and i only know about consule project. iostream!! I am trying to build a form and run a specific application with it. I am already made the project as a console project using fstream. I want to get the name of the file from the user in a specific text Box and then open it as follows: char fileName[]; ifstream infile; infile.open(fileName); However what i get from the textbox is String *f = textBox->Text; How can i convert this to char[]? I have already tried char fileName[]=f->ToCharArray(); but it seams there is a problem and i cant convert _wchar to char!! how can I do this? is there another way to open the file ?
Are you trying to get the string from editobx? If you go with MFC.. CString str_FileName; CEdit * pEditBox = ( CEdit * )GetDlgItem( ResourceIDForYourTextBox ); pEditBox -> GetWindowText( str_FileName ); I am not sure if this is the answer to your question. Shin
-
Are you trying to get the string from editobx? If you go with MFC.. CString str_FileName; CEdit * pEditBox = ( CEdit * )GetDlgItem( ResourceIDForYourTextBox ); pEditBox -> GetWindowText( str_FileName ); I am not sure if this is the answer to your question. Shin
no i am just using a simple form. still dont get what u r trying to say!?
-
no i am just using a simple form. still dont get what u r trying to say!?