I want to make a program similar to the dos prompt (i dont know the english name for it) in wich you can issue commands to your system (like 'netsat -n' or 'ping 127.0.0.1'). It works, but it should return to the main() function as soon as the command was executed. Instead, it closes. The code i have so far is:
could anyone pease tell me what`s wrong with the code?Code:#include <iostream.h> char command[99999]; int main() { cout << "Command>"; cin.getline(command, 99999, '\n'); system(command); int main(); return 0; }



LinkBack URL
About LinkBacks



