title: convert char to string in c++
body: <p>I am trying to reduce a string by giving it to a function. For example, if i have <code>&quot;abrakadabra&quot;</code>, the function shall return a string of <code>&quot;abrkd&quot;</code>. Which means that all characters should exist only once in the return value.</p>
  <p>I have the following function:</p>
  <pre><code>string textletters(string text) {
      string ret = &quot;&quot;;
      for (unsigned i = 0; i &lt; text.length(); i++) {
          if (i == 0) {
              ret += str;
          } else {
              bool exist = false;
              for (unsigned j = 0; j &lt; i; j++) {
                  if (text.at(i) == text.at(j) {
                      exist = true;
                  }
              }
              if (!exist) {
                  ret += str;
              }
          }
      }
      return ret;
  }
  </code></pre>
  <p>I know that <code>text.at(i)</code> gives a <code>char</code> back. But I want to convert this <code>char</code> to a <code>string</code> so I can concatenate it.</p>