system( "ping www.google.com > pingresult.txt")
От този код може ли низът "ping www.google.com"
да бъде взет от променлива std::string
? Например:
string ipAddress;
cout << "Enter the ip address: ";
cin >> ipAddress;
string ip = "ping" + ipAddress;
**system ("ip > pingresult.txt");** //error here
sytem("exit");