<p>If I want to construct a std::string with a line like:</p>

<pre><code>std::string my_string("a\0b");
</code></pre>

<p>Where i want to have three characters in the resulting string (a, null, b), I only get one.  What is the proper syntax?</p>

I have no idea
why
you'd want to do such a thing, but try this:
```
```
std::string my_string("a\0b", 3);
```
```