Im trying to get a string variable into a system command but it wont work, whats wrong with my code?
char cmd[200],comp[256],message[256];
cout<<" Enter computer name: 008-";
cin.getline(comp,256,'\n');cin.get();
cout<<" Enter message: ";
cin.getline(message,256,'\n');cin.get();
sprintf(cmd,"net send 008-%s",comp," %s",message);
cin.get();