Hi guys..
I'm still going through C++, learning new stuffs. It is true that I have finished my C++ course two years ago. But, you all know C++ have too much things to learn!
Anyway, I need help guys "kindly" how can I open a program/or any file using C++?
What I want is when I "Compile, Build and Run" the C++ code, it'll open for me a program that I specified in the code.
Can anyone explains to me how to do that? Does have to do with input/output file stream?
I found this code, which makes you type the name of the program and it opens it.
Can you kindly explains it to me too?
#include <iostream>
#include <conio.h>
using namespace std;
int main() {
char s1[256],s2[256];
cout<<"Program name: ";
gets(s1);
sprintf(s2,"START %s",s1);
const char* prgm=s2;
system(prgm);
}
Thanks all. :)