Well, ive tried making the user input quit to exit:
Code:
#include <iostream.h>
#include <string.h>
char command[99999];
int main()
{
cout << "Command>";
cin.getline(command, 99999, '\n');
if(!strcmpi("quit", char command)
{
return 0;system(command);
int main();
}
else
{
system(command);
int main();
}
}
But in Dev-cpp it gives me the errors:
parse error before `)' token
parse error before `else'
But i couldn`t find any missing semicolons, wrong letters, etc.
And using instead of using
Code:
cin.getline(command, 99999, '\n')
would make ping 127.0.0.1 to be read by the program as ping.