title: How to convert "std::vector<std::string>" to "const char* array"?
body: <p>There is a function that needs a const char* array, basically a list of words. Because this list of word can change, I can not declare and initalize this array at program start. For now, I have a vector of strings and I need to convert this to an array of const char*. How can this be done? Thanks!</p>
  
  <p>Example:</p>
  
  <pre><code>std::vector&lt;std::string&gt; list;
  list.push_back("word1");
  list.push_back("word2"); // and so on...
  
  const char* wordList[] = ???
  </code></pre>