文字列を system() 経由で実行できるものに変換するにはどうすればよいですか?
私はこれを持っています
std::string out = "some command to run" + some_string_variable;
system(out);
これはコンパイルされず、変換エラーが発生します
std::string から const char への適切な変換関数がありません *
でも走ろうとすると
system("pause");
それはうまくいく
文字列を system() 経由で実行できるものに変換するにはどうすればよいですか?
私はこれを持っています
std::string out = "some command to run" + some_string_variable;
system(out);
これはコンパイルされず、変換エラーが発生します
std::string から const char への適切な変換関数がありません *
でも走ろうとすると
system("pause");
それはうまくいく