Hallo all.
Iv spent a lot of time browsing through the old threads and I cannot find a solution to my problem. Please help...

I have to files
H:\me.txt
and
H:\you.exe
and I want to write a code in Turbo C++ to open these in a separate window, meaning I don't want the data that is in them to be incorporated into my program but for them to open and run themselves.

Not even my Software Design lecturer has any idea what to do here.
Your my last resort!!

Well, as the txt file is non-executing, you will need to decide what program you wish to open it with.

You can then open the programs using CreateProcess using the correct parameters.

If your lecturer didn't know how to do this, I would be worried...

Comments
Gave me a great site for C++ information

So you want me.txt to open in notepad and you.exe to execute?

Thats precisely what I want to do.

Well, as the txt file is non-executing, you will need to decide what program you wish to open it with.

You can then open the programs using CreateProcess using the correct parameters.

If your lecturer didn't know how to do this, I would be worried...

I'v spent many a night awake worrying.

I want to write a command in Turbo C++ that when executed the notepad file (me.txt) to open. Is there not just a simple command line that will do this?

I'v went through the link you set up for me, thank you, It solved a lot of other problems and it is a great site, but it didn't help with this.

CreateProcess will do exactly what you want to do. Another option is to use System(); but it's not recommended as you lose control of execution.

CreateProcess looks daunting, but it really isn't and it will help you further down the line if and when you want to control/monitor the applications you're running.

This question has already been answered. Start a new discussion instead.