title: Access violation reading location 0x00000014. Using Streams
body: <p>So I have this ifStream and it reads alright from the file. I read one line in order to check the type of item I am reading in. Then After I have read in that i pass the stream to another class which reads some more but when it gets to this class it throws this exception. Access violation reading location 0x00000014.
  Here is the code where it shows this error.</p>
  
  <pre><code>void Author::readData(ifstream &amp; stream1)
  {
      string line = "";
      getline(stream1, name); //The error happens here
      if (stream1.fail() &amp;&amp; stream1.eof())
      {
          throw Error(-1);
      }
      else if (stream1.fail() &amp;&amp; !(stream1.eof()))
      {
          throw Error(0);
      }
      getline(stream1, address);
      if (stream1.fail() &amp;&amp; stream1.eof())
      {
          throw Error(-1);
      }
      else if (stream1.fail() &amp;&amp; !(stream1.eof()))
      {
          throw Error(0);
      }
  }
  
  void Book::readData(ifstream &amp; stream1)
  {   
  
      (*theAuthor).readData(stream1); //This is where the function is called. Let me check to see if It is even initialized here.
      if (stream1.fail() &amp;&amp; stream1.eof())
      {
          throw Error(-1);
      }
      else if (stream1.fail() &amp;&amp; !(stream1.eof()))
      {
          throw Error(0);
      }
      getline(stream1, title);
      if (stream1.fail() &amp;&amp; stream1.eof())
      {
          throw Error(-1);
      }
      else if (stream1.fail() &amp;&amp; !(stream1.eof()))
      {
          throw Error(0);
      }
  </code></pre>
  
  <p>I have done research on many differing websites but I cant seem to find any that explain why an ifstream is throwing this exception. Please help.</p>
  
  <p>Edit: Added some more code in hopes it may help.</p>