Comments

: I use Visual C++ 6.0.: I've got two problems.: First I want to start an Exe File when klicking a Button in my Application. What do I have to write into the BnClicked Funktion?: [blue]In the resource editor, just double-click the button. ClassWizzard will create a function for you.[/blue]

: Second I want to delete a Text file, which I have accessed with:: : ifstream fin("info");: char str(80);: int i;: fin>>str>>i;: MessageBox(str+" "+i);: fin.close();: : So after reading the Data out of the File, I want to delete it. What is the easiest way to do this.: : : PS.: Please keep it simple since I'm a Newbie in C++ programming and the programm mustn't be absolut professional.: [code] remove("filename");[/code]

: : I use Visual C++ 6.0.: : I've got two problems.: : First I want to start an Exe File when klicking a Button in my Application. What do I have to write into the BnClicked Funktion?: : : [blue]In the resource editor, just double-click the button. ClassWizzard will create a function for you.[/blue]: : : Second I want to delete a Text file, which I have accessed with:: : : : ifstream fin("info");: : char str(80);: : int i;: : fin>>str>>i;: : MessageBox(str+" "+i);: : fin.close();: : : : So after reading the Data out of the File, I want to delete it. What is the easiest way to do this.: : : : : : PS.: Please keep it simple since I'm a Newbie in C++ programming and the programm mustn't be absolut professional.: : : [code]: remove("filename");: [/code]: :

also for the line char str(80);it should be restated to char str[80];or char *str = new char[80];seing that an arry is defined by [] bracketsTFKyle

[b][red]This message was edited by Jun_Misugi at 2003-7-6 4:16:21[/red][/b][hr]: [blue]In the resource editor, just double-click the button. ClassWizzard will create a function for you.[/blue]: [code]: remove("filename");: [/code]First: I think I made my self missunderstood. I actually have this function you described, but with this function I want to start another .Exe outside my Programm.[code]void Admin::OnInsertMember() { //Starting "Login.exe" here}[/code]And now I need some code to start this Login.exe.

Second: Thanks, that's what I wanted.

@TFKey: Thanks, typing error which I have already corrected in my code.

: First: I think I made my self missunderstood. I actually have this function you described, but with this function I want to start another .Exe outside my Programm.: [code]: void Admin::OnInsertMember() : {: //Starting "Login.exe" here: }: [/code]: And now I need some code to start this Login.exe.:

[blue]use either CreateProcess() or WinExec() or system() functions.[/blue]