LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   how do you import bash script to a c++ program? (https://www.linuxquestions.org/questions/programming-9/how-do-you-import-bash-script-to-a-c-program-550580/)

jaepi 05-02-2007 02:35 AM

how do you import bash script to a c++ program?
 
hello there, im just curious, is there a way that a bash script can be imported to a c++ program, because i want to create a program in c++ that will enable to open the hdd(dvd-rom) when a user will supply a correct password...then will close after 15 seconds...need your help...thank you.. :D

vazrik 05-02-2007 02:54 AM

I am not sure what you mean by "import." If you like to execute a shell script from your c code, use system("yourscript");

jaepi 05-02-2007 03:28 AM

Quote:

Originally Posted by vazrik
I am not sure what you mean by "import." If you like to execute a shell script from your c code, use system("yourscript");

yes, to execute a shell script to a c++ program..:D


All times are GMT -5. The time now is 02:04 AM.