LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-25-2005, 09:26 AM   #1
psIpher
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Rep: Reputation: 0
running executable in C++ code


hi all,

i'm new to C++ programming and i'm trying to write a program which relies on another program ive already written.

the first program runs from the shell prompt like this:

# ./runner {/*various command line options*/}

the second program is caller driver and i need to call the runner program from within driver, i've tried using the command as is, with symbolic links to the runner directory and then putting both files in the same directory, does anybody have a clue as to how i should go about this.

Thanks in advance

p.s im running FC1
 
Old 11-25-2005, 12:02 PM   #2
mic
Member
 
Registered: Jun 2005
Posts: 44

Rep: Reputation: 16
int system(const char *command);

example:
Code:
#include <stdlib.h>

int main() {
  ...
  system("./runner --some-options");
  ...
}
 
Old 11-25-2005, 02:44 PM   #3
psIpher
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Original Poster
Rep: Reputation: 0
cheers mate!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a Java executable class from another executable class LUB997 Programming 22 07-24-2005 05:57 AM
Running an executable. wesleyarchbell Linux - Software 4 05-03-2005 04:50 AM
how to convert C executable into Assembly Code indian Programming 4 10-04-2004 05:56 PM
running an executable wogga Linux - Software 8 06-12-2004 05:21 AM
Where can I find compilable/executable Ping source code johnsont Programming 3 09-12-2003 01:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration