I have problems with inserting string variable inside text.
string p="http://www.google.com" ;
system("c:\\progra~1\\intern~1\\iexplore.exe \"http://www.google.com\"");
I need a way to use p instead of “http://www.google.com\”
I tried
system("c:\\progra~1\\intern~1\\iexplore.exe \%p\"");
but it doesn’t work. I’m not very good with strings so probably that’s the prob.
In C++ you can use the + operator to concatenate strings:
In this case this is a bit hard to read, so you’re better off creating the string before hand.
A better way would be to use stringstream: