title: Reading Files in C++
body: <p>I'm looking for a way to way to read files in C++ I can write files, but here's where I'm stuck at: </p>
  
  <pre><code>ifstream readfile;
  readfile.open("C:/Users/Crazy/Desktop/Useless.txt")
  </code></pre>
  
  <p>I 've seen people do things such as:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  
  using namespace std;
  
  int main() {
  
      ifstream myReadFile;
      myReadFile.open("text.txt");
      char output[100];
      if (myReadFile.is_open()) {
          while (!myReadFile.eof()) {
  
              myReadFile &gt;&gt; output;
              cout &lt;&lt; output;
  
          }
      }
      myReadFile.close();
      return 0;
  }
  </code></pre>
  
  <p>But in</p>
  
  <pre><code>char output[100];
  </code></pre>
  
  <p>I want the whole thing read.</p>
  
  <p>Also, I just want to only read it, not to check if it's already open, not to, check for errors. I just want to read the whole thing, and the whole thing only.</p>