Ok so i i had a program made a while back that i used at my school to basically get around the fire wall kinda. Our school blocks us to use .exe files so i made a program that allowed me to type in the directory of the file that i wanted to boot and it would boot it.
Its been awhile since ive used C++ and i dont exactly remember how to do every thing so im trying to remember how to remake this program. any help would be apreciated
This is what i have so far
#include %26lt;iostream%26gt;
using namespace std;
int main()
{
int d;
cout %26lt;%26lt;"Enter the Directory of the file you would like to open";
cin %26gt;%26gt;d;
system //i no some thing goes here and this is what actualy boots it but not really sure how its written
return 0;
}
Will any body help me with C++?
it's called "executing", "booting" is when you turn your computer on.
This code should work-
#include %26lt;iostream%26gt;
#include %26lt;cstdlib%26gt;
using namespace std;
int main()
{
string programName;
cout %26lt;%26lt;"Enter the Directory of the file you would like to open";
cin %26gt;%26gt;programName;
std::system(programName.c_str());
return 0;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment