如何在系统中使用字符串变量(“比如字符串变量”)?

时间:2017-10-28 23:00:37

标签: c++ system-calls

/ *我想过以这种方式做,但它无效。  所以任何帮助将不胜感激。 * /

#include <cstdlib>
#include <iostream>
#include <string>

using namespace std;
int main()
{
   string name = "Karma";
   string greet = "How was your day?";
   string sums = name + greet;

   system("say %s", sums) // not working
   // system("say sums")  not working

   return 0;
}

1 个答案:

答案 0 :(得分:2)

您可以使用:

runtime: python-compat
env: flex
entrypoint: gunicorn -b :$PORT main:app


runtime_config:
  python_version: 2
threadsafe: true

handlers:
- url: /.*
  script: main.app

- url: /static
  static_dir: static

- url: .*
  script: main.app

而不是:

system(("say" + sums).c_str())