title: Convert std::string to char * alternative
body: <p>I have done a search in google and been told this is impossible as I can only get a static <code>char *</code> from a string, so I am looking for an alternative.</p>
  
  <p>Here is the situation:
  I have a .txt file that contains a list of other .txt files and some numbers, this is done so the program can be added to without recompilation. I use an <code>ifstream</code> to read the filenames into a string. </p>
  
  <p>The function that they are required for is expecting a <code>char *</code> not a <code>string</code> and apparently this conversion is impossible.</p>
  
  <p>I have access to this function but it calls another function with the <code>char *</code> so I think im stuck using a <code>char *</code>.</p>
  
  <p>Does anyone know of a work around or another way of doing this?</p>