title: c++ reading issue with \0
body: <p>Good Morning,</p>
  
  <p>I've written a little program in c++ that reads some <code>csv</code> and <code>txt</code> files and then compare them with some rules.</p>
  
  <p>My Problem is that the export has some <code>'\0'</code> after every letter and i can't change the export.</p>
  
  <p>So I'm trying to read the File and remove the <code>'\0'</code></p>
  
  <p>At the moment i'm doing this with the following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;fstream&gt;
  int main()
  {
      ifstream QuelleExport;
      string temp;
      int found;
      vector&lt;InstitutionsDaten&gt; vecInstitutionsDaten;
  
      //Reading the Path out of a Text File and storing it into 'QuelleExport'
      found = temp.find("PfadExport=");
      if (found &gt; 0)
      {
          cout &lt;&lt; "Der Export wird aus folgender Datei ausgelesen: " &lt;&lt; endl;
          QuelleExport = Allgemein::lesenöffnen(temp.replace(0, temp.find_first_of("= ") + 2, ""));
       }
       while (getline(QuelleInstitutionsDaten, temp))
       {
           try 
           {
               if (temp != "")
               {
                   remove(temp.begin(), temp.end(), '\0');
                   InstitutionsDaten tempClass(temp);
  
                   vecInstitutionsDaten.push_back(tempClass);
                   temp.clear();
               }
           }
           catch (...)
           {
  
           }
       }
  }
  </code></pre>
  
  <p>The replacement works often but not every time and also it seams like the string temp sometimes has data which shouldn't be there.</p>
  
  <p>Is there any possibility to remove all <code>c_str</code> escape chars without just deleting them or do you've a other solution?</p>