how do i ping some IPs through "system" function?
i need help and i hope someone would know the answer to my q.
what i want to do is to ping a list of IPs stored in a vector or a file (it doesn't matter) using system and for each ip i need to store the output of the "ping" command.
how do i use the function if the ip is variable?
i need something like this:
system("ping -c 1" + host[i]+ ">>output.txt") //host[i] is an ip from the vector
witch is the correct syntax?
thanks in advance...