LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Executing command lines in C/C++ (http://www.linuxquestions.org/questions/programming-9/executing-command-lines-in-c-c-21962/)

ReverseLogic 05-27-2002 10:14 PM

Executing command lines in C/C++
 
Lord of the newbies here again. How does one execute a particular command line (such as "ping 192.168.0.1") in C/C++ on a Mandrake 8.0 machine (or linux in general)? Do you have to use a special function like Winexec() in Windows? If so, what is the name of this function, and what file is it declared in? If not, how do I do this?
Thanks in advance,
-RL

vfs 05-28-2002 07:53 AM

Don't misunderstand me, I'm not rude, but do a search before asking this kind of question.

I saw it answered 3 or 4 times, only this week...

BTW, you're looking for the system() function.


'man system' may help.

vfs

ReverseLogic 05-28-2002 03:08 PM

sorry about that. You're not being rude. I was just being stupid. I was tired.


All times are GMT -5. The time now is 06:29 AM.