putting variables together in system
I'm trying to get a net send function workin in console.. heres my source
Code:
int main()
{
cout<<"Enter IP address>"; // ASKS for IP
char ip[16];
cin>>ip; //PUTS IP in the variable
cout<<"\nEnter a message>"; //ASKS for message
char message[225];
cin.ignore(1,'\n'); //Ignores the \n
cin.getline(message, sizeof (message)); //GEts the message
cout<<"\nSending.."; //Just tells it its sending
return 0;
}
I'm trying to use
system("net send (inputed IP) (inputed MESSAGE)");
but i dont know how to get the inputed IP or message into the system command.
by the way, this is in console if you cant figure out