+ 3

Is it possible to link any other program in the system by using C++

I want to create a program which open a program from my computer disk when user enter it's name, or to open web page when condition satisfy in the program, is it possible, if yes, how? Please describe it.

28th Apr 2017, 3:41 PM
Akash Kumar Sharma
Akash Kumar Sharma - avatar
10 Answers
+ 1
yes it is possible... you can include stdlib.h then type system("start my_drive/file_location/app_name.exe"); to start specified program ... replace the variables according to your choice. to open browser system ("start chrome.exe"); to open a website try system ("start https:\\www.mysite.com"); this will open the site in system's default browser. I HOPE IT MAYBE​ HELPFUL
28th Apr 2017, 5:38 PM
SAKET upadhyay
SAKET upadhyay - avatar
+ 3
Saket, is there any necessacity to include system header file <system.h>
28th Apr 2017, 7:15 PM
Akash Kumar Sharma
Akash Kumar Sharma - avatar
+ 3
Saket it is giving an error, program is not working
29th Apr 2017, 2:28 AM
Akash Kumar Sharma
Akash Kumar Sharma - avatar
+ 2
Saket, just check my code I have just tried it, it's not working here.😢😢
29th Apr 2017, 12:26 PM
Akash Kumar Sharma
Akash Kumar Sharma - avatar
+ 1
for more info u can mail me the problem at saketupadhya@gmail.com
29th Apr 2017, 5:11 AM
SAKET upadhyay
SAKET upadhyay - avatar
+ 1
in my profile,
30th Apr 2017, 2:50 AM
Akash Kumar Sharma
Akash Kumar Sharma - avatar
0
yes it is possible... you can include stdlib.h then type system("start my_drive/file_location/app_name.exe"); to start specified program ... replace the variables according to your choice. to open browser system ("start chrome.exe"); to open a website try system ("start https:\\www.mysite.com"); this will open the site in system's default browser. I HOPE IT MAYBE​ HELPFUL
28th Apr 2017, 5:38 PM
SAKET upadhyay
SAKET upadhyay - avatar
0
not necessary to include system.h. ... but include stdlib.h
29th Apr 2017, 5:10 AM
SAKET upadhyay
SAKET upadhyay - avatar
0
it works on Windows and Linux with respective commands
29th Apr 2017, 5:11 AM
SAKET upadhyay
SAKET upadhyay - avatar
0
where's the code?
30th Apr 2017, 1:30 AM
SAKET upadhyay
SAKET upadhyay - avatar