Can i pass a variable to system() with c++?

December 24, 2012 at 14:13:15
Specs: Windows 7
I'm trying to make a program like this
char username;
long password;
{
cout <<"Enter username : ";
cin >>username;
cout <<"Password : ";
cin >>password;
system("Command" username,password);
}
, the problem is that i can't pass the username and the password to function system()
Help please.

See More: Can i pass a variable to system() with c++?

Report •


#1
December 25, 2012 at 10:05:07
Look up string concatenation in C and/or the function sprintf().

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question