![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Sep 2005
Posts: 27
Rep Power: 0
![]() |
calling a program
can someone tell me how to call a program?
im lost ![]() |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: here
Posts: 144
Rep Power: 0
![]() |
first you have to know its number....
(sorry, I couldnt resist) Your question is not very descriptive... Do you mean from within you program, via a pipe, or just plain 'how do I execute my compiled program'? Provide more detail and you will get a better answer.
__________________
"...and though our kids are blessed their parents let them shoulder all the blame." - The Quiet Things That No One Ever Knows [BrandNew] |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Sep 2005
Posts: 27
Rep Power: 0
![]() |
sorry, i meant how do i run a program from within the one i am making
and if you dont mind answering, how do i find the programs number? |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Sep 2004
Posts: 23
Rep Power: 0
![]() |
i'd bet it'd be on the "programs directory listing".
![]() |
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
#include <cstdlib>
...
std::system("yourprogramname.exe"); |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Sep 2005
Posts: 27
Rep Power: 0
![]() |
thnx a lot, that really helped!!!
|
|
|
|
|
|
#7 |
|
Newbie
Join Date: Sep 2005
Location: Slovenia
Posts: 17
Rep Power: 0
![]() |
Why does system() work for me in Dev-Cpp (mingw compiler) when i include iostream?
|
|
|
|
|
|
#8 |
|
Programmer
Join Date: Jun 2005
Posts: 92
Rep Power: 4
![]() |
@snow: because Dev-Cpp automatically includes some header files for you
|
|
|
|
|
|
#9 |
|
Newbie
Join Date: Sep 2005
Posts: 27
Rep Power: 0
![]() |
Ok, i got my program to call programs like cmd, or telnet, but it wont call this other program i made. can someone tell me whats wrong plz?
thnx, Dfoled |
|
|
|
|
|
#10 |
|
Programming Guru
![]() |
Most likely it's the wrong path. call it with the directory as well... like...
system("c:\\your\\dir\\to\\exe\\here\\whatever.exe");
__________________
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|