954,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Executing two external programs

Hello,

I am trying to execute two external programs at once. Here's my code:

#include<iostream>
using namespace std;
int main() {
    system("cd  \\ && cd Program Files\\Skype\\Phone && Skype.exe");
    cout<<"Skype launched \n";
    system("cd  \\ && cd Program Files\\MAXA Notifier for Skype && SkypeNotifier.exe ");
    cout<<"MAXA launched \n";
    system("pause");
    return 0;
}


I have very poor, basic knowledge about programming i got in high school. What I am trying to accomplish might not even be possible with my method so please provide me with detailed comments so that I can understand and learn.
What is happening is that the code works but after the first program is executed it pauses until the process is somehow terminated. Same happens when the second program is executed. Why? What I want is both to run together.
Using Dev C++, Windows XP.
Thanks for your attention in advance!

magnumsv
Newbie Poster
1 post since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

1. system("pause") is not portable... don't use it.
2. Get rid of Dev-C++... it's no longer supported or updated and needs to die.
3. If you can't figure this out or learn to use Google, then go read a book. Don't just jump ahead to the hard stuff if you haven't even gotten the basics down.

packetpirate
Junior Poster in Training
60 posts since Jun 2010
Reputation Points: 10
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: