The +'s dont seem to work, I get an error on compile but I'll show you what does work.
Code:
#include <iostream>
#include <dos.h>
#include <string>
using namespace std;
char host[64], msg[512];
string systemSender = "net send ";
char getinfo()
{
cout<< "Hostname: ";
cin.getline (host, 64, '\n');
cout<< "Message: ";
cin.getline (msg, 512, '\n');
}
char send()
{
systemSender += host;
systemSender += " ";
systemSender += msg;
system(systemSender.c_str());
}
int main()
{
getinfo();
send();
cin.get();
}
Anything I'm missing thats not letting me use "+ host + msg" ?