need help with this small code... pls..
Hi there, first of all, i want to make the "ip1" char, go 1 higher, and i don't know how to do that. (like from 127.0.0.1 to 127.0.0.2).
And second, i'd like to know how to use it in system(); (or something else that does the same). i've tried adding it to system, but i get this error,
error C2660: 'system' : function does not take 3 parameters
How can i do this, please help.... i've searched my ass off..... hehe :)
Code:
#include<iostream.h>
#include<process.h>
int main()
{
char ip1[15];
char ip2[15];
cout << "Start IP: ";
cin >> ip1;
cout << "Stop IP: ";
cin >> ip2;
if (ip1<ip2)
{
cout << "Start IP can not be higher than Stop IP." << endl;
}
else
{
cout << "Scanning: [" << ip1 << "] -> [" << ip2 << "]" << endl;
while(ip1!=ip2)
{
/* Here i want to add the "ip1" char to system(); */
/* Here i want the "ip1" char to go 1 higher. */
}
}
cin.get();
return 0;
}