title: C++ How can I ignore symbols when reading a file?
body: <p>this is my current read file code:</p>
  
  <pre><code>void Dictionary::processFile() {
      ifstream fin;
      fin.open("article.txt");
      if (fin.fail( )) {
          cout &lt;&lt; "Input file opening failed.\n";
          exit(1);
      }
  
      string word;
  
      while (!fin.eof()) {
          fin &gt;&gt; word;
          cout &lt;&lt; word &lt;&lt; endl;
      }
      cout &lt;&lt; endl;
      fin.close();
  }
  </code></pre>
  
  <p>How can I make my code ignore symbols(".';:! etc.) and only output/read words? at the moment it is reading every single symbol on the article. example "test.", "them,"</p>