How can i open Mozilla Firefox using c++ codes. Compiled through compiler like codeblocks. Hve tried this. Not working

Sunday, July 6, 2014


/*Running Firefox.exe*/

#include <stdio.h>

/*using c++*/

#include <iostream>

#include <stdlib.h>

using namespace std;

int main ()
{
int x;
cout << "Checking if processor is available..." << endl;
/*System used here*/
if (system(NULL)) puts ("Proceed");

else exit (1);

cout<< "Executing Firefox..." << endl;

/*Having some error here saying not recognized as internal or external command*/

x = system ("C:/Program Files (x86)/Mozilla Firefox/firefox.exe");
/*cout here*/
cout <<"The value returned was:" << x << endl;


return 0;
/*Is it because Firefox is not recognized as a system of windows? if so how can i run firefox or even internet explorer out of a code? Thanks in advance*/
}






http://ift.tt/1mlnbR2