i need to have the user type in the address of the program it wants to open and have it open that. how would i do that in C++ programing
How to open a program in C++?
try this
#include %26lt;iostream%26gt;
#include %26lt;conio.h%26gt;
using namespace std;
int main() {
char s1[256],s2[256];
cout%26lt;%26lt;"Program name: ";
gets(s1);
sprintf(s2,"START %s",s1);
const char* prgm=s2;
system(prgm);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment