Hey everyone, I have a quick (and hopefully simple question). I'm writing a simple program that will ask the user for two different inputs(IP address and message), save those as strings, then run a command in command prompt adding those strings on the end as arguments. I'm using it to change the message displayed on HP printer screens by using a little program called HPhack. In command prompt, it would look like this:
HPHack.exe 192.168.10.1 "Message!!"
I'm using system("command") right now, but I don't know how to pass those arguments along with it.
Thanks!
cout<<"Enter IP address of target printer:"<<endl;
getline (cin, ip);
cout<<"Enter message in quotes:"<<endl;
getline (cin, message);
system("hphack.exe "ip" "message);