The following code doesn't work:
string currency;
currency = "EURUSD";
system("lynx -dump 'http://somesite.com/q?s="+currency+"=X' > file.txt");
How do I use currency inside this line of C++'s system() call?
This is my error:
Error value:
main.cpp: In function ‘int main()’:
main.cpp:22:84: error: cannot convert ‘std::basic_string<char>’ to ‘const char*’ for argument ‘1’ to ‘int system(const char*)’
make: *** [main.o] Error 1
BUILD FAILED (exit value 2, total time: 890ms)
In PHP I use . to join strings, but in C++ I am not sure of the syntax.