title: fstream getline() Unhandled exception
body: <p>am trying to read a file so am doing:-</p>
  
  <pre><code>void Load(const char * Name){
      fs.open(Name, std::ifstream::in);
          char temp[256];
  
      if(fs.is_open()){
  
          while (!fs.eof())
          {
              fs.getline(temp , 256);
              Lines.push_back(new std::string(temp));
          }
  }
  }
  </code></pre>
  
  <p>but it breaks on the <code>getline</code> -> </p>
  
  <pre><code>Unhandled exception at 0x7730B4D9 (ntdll.dll) in GameCore.exe: 0xC0000005: Access violation writing location 0x00000014.
  </code></pre>
  
  <p>where it's check </p>
  
  <pre><code>else
              /*
               * Not part of _iob[]. Therefore, *pf is a _FILEX and the
               * lock field of the struct is an initialized critical
               * section.
               */
              EnterCriticalSection( &amp;(((_FILEX *)pf)-&gt;lock) );
  </code></pre>
  
  <p>in the <code>_file.c</code> file , what's wrong here?</p>