#include <stdio.h>
#include<conio.h>
#include<string>
#include<iostream>
using namespace std;
int main()
{
string aa ,bb;
aa="mycomp"; //Comp name
bb="User1"; //User name
string r_parameter=" -l ";
string r_parameter1=" -n ";
string r_exe="ipconfig";
aa.append(r_parameter);
aa.append(bb);
aa.append(r_parameter1);
aa.append(r_exe);
cout<<"\nHello\n";
cout << aa << endl;
system(" Rsh aa");
getch();
}
problem is execution at here ---system(" Rsh aa");
but when run system (" Rsh mycomp -l User1-n ipconfig"); it works...
how to resolve this problem??