<p>This line:</p>

<pre><code>strcat(query,*it);
</code></pre>

<p>(where <code>*it</code> is an iterator to a string)</p>

<p>Keeps giving me this error:</p>

<blockquote>
  <p>no matching function for call to ``strcat(char[200], const std::basic_string, std::allocator >&amp;)`' </p>
</blockquote>

<p>I guess it's because <code>strcat</code> takes in a <code>char*</code> while <code>*it</code> is a string.
How do I convert it from a string to a <code>char*</code> to make it work with <code>strcat()</code> ?</p>

<p>I've tried <code>strcat(query,(*it).c_str())</code> but that just gives me a runtime error.</p>

<p>Edit: sorry, it should be converted to a <code>const char*</code></p>

```
strcat(query,(*it).c_str())
```
should work. What's the runtime error? Are you sure that
```
query
```
is null-terminated before you make the call?