My problem I am having is when I use execl, it close my main program. I want the program I create can open other programs or create other actions with linux. I am looking to help getting on the right path. Should I be using execl? Why does it close the main program after it runs execl?
while (y0 != "no")
{
cout << endl;
cout << "How many I help you? Enter Command";
cout << endl << "open" << endl << "close" << endl << "delete" << endl << "search" << endl << "Enter what program or file like to action ";
cin >> y0 >> y1;
if (y0 == "open")
{
cout << y1 << endl;
if (y1 == "vlc")
{
strcpy(y3, "/usr/bin/");
strcat (y3, y1);
cout << "Enter path ";
cin >> path;
strcpy (y2, "/home/john/Videos/");
strcat (y2, path);
execl (y3,"vlc",y2);
}
if (y1 != "vlc")
{
strcpy(y3, "/usr/bin/");
strcat (y3, y1);
execl (y3, "a");
}