I need using an int veriable in system() function for my c++ program. for example:
- int a = 0;
- system("echo "a" ");
but i get an error and i need help about how i use this like that Error: C++ user-defined literal operator not found
I need using an int veriable in system() function for my c++ program. for example:
but i get an error and i need help about how i use this like that Error: C++ user-defined literal operator not found
That's never going to work. C++ doesn't plug integers into strings that way. Instead, you can do:
int a = 42;
std::string s = "echo " + std::to_string (a);
system (s.c_str ());
Also, you might consult this page, in order to learn the language properly.