C++ null string
<p>I have a function in a C++ program returning a <code>string</code>.
On certain conditions, e.g. if the function encounters an error or so, I want to return a special value telling the caller that something has gone wrong.</p>

<p>I could basically just return an empty string <code>""</code>, but the function does need the empty string as normal return value.</p>

<ul>
<li>How can I accomplish this?</li>
<li>Do I have do create a special data structure that for my function that holds a bool if the function was successfully run and a string containing the actual return value?</li>
</ul>
