That's probably the coolest error message I've ever heard of. Only "fandango on core" would be cooler.
Yes, str is too short. A quick fix could be
1 2 3
|
char str[1000];
strcpy(str,"ping -c 3 ");
//(Leave the rest as it was.)
|
If this is C++, though
1 2
|
//(I don't feel like complaining about system() right now.)
system((std::string("ping -c 3")+argv[1]+"> Ping").c_str());
|
Last edited on
It worked !
Thanks a lot !