I get this error: \"invalid operands of types \'const char*\' and \'const char [6]\' to binary \'operator+\'\" when i try to compile my script. Here should be the error:
As all the other answers show, the problem is that adding a std::string and a const char* using + results in a std::string, while system() expects a const char*. And the solution is to use c_str(). However, you can also do it without a temporary:
string name = "john";
system((" quickscan.exe resolution 300 selectscanner jpg showui showprogress filename '"+name+".jpg'").c_str());