Hello all,
Wondering why i cannnot use "strcat(s1, s2)"??
where:
char* s1;
s1 = "ls ";
string s2 = argv[1]; // where argv[1] is "-a" etc.
I want to strcat it so that i can get "ls -a" in one variable to pass into the system() function.
its really puzzling me, as the system() function cant use a string variable as its parameter, and needs a char*??
Anyhelp will be appreciated greatly,
-evosix-
Wondering why i cannnot use "strcat(s1, s2)"??
where:
char* s1;
s1 = "ls ";
string s2 = argv[1]; // where argv[1] is "-a" etc.
I want to strcat it so that i can get "ls -a" in one variable to pass into the system() function.
its really puzzling me, as the system() function cant use a string variable as its parameter, and needs a char*??
Anyhelp will be appreciated greatly,
-evosix-