title: getline not working with fstream
body: <p>I am trying to use a text file to initialise a struct that will be used to initialise a 2d vector, yes I know it's complicated but there is going to be a lot of data to work with eventually. The problem is with getline, I have used it this way fine in other code but for some reason it's refusing to work here. I keep getting an argument error and template error. Any hints would be very much appreciated.</p>
  
  <pre><code>#include &lt;fstream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  const int HORIZROOMS=10;
  const int VERTROOMS=10;
  const int MAXDESCRIPTIONS=20;
  const int MAXEXITS=6;
  
  struct theme
  {
      string descriptions[MAXDESCRIPTIONS];
      string exits[MAXEXITS];
  };
  
  void getTheme();
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      getTheme();
      vector&lt;vector &lt;room&gt;&gt; rooms(HORIZROOMS, vector&lt;room&gt;(VERTROOMS));
      for (int i=0; i&lt;HORIZROOMS; i++)
      {
          for (int j=0; j&lt;VERTROOMS; j++)
          {
              cout&lt;&lt;i&lt;&lt;" "&lt;&lt;j&lt;&lt;" "&lt;&lt;rooms[i][j].getRoomDescription()&lt;&lt;endl;
          }
      }
      return 0;
  }
  
  void getTheme()
  {
      theme currentTheme;
      string temp;
      int numDescriptions;
      int numExits;
      ifstream themeFile("zombie.txt");
      getline(themeFile, numDescriptions, ',');
      for (int i=0; i&lt;numDescriptions; i++)
      {
          getline(themeFile, temp, ',');
          currentTheme.descriptions[i]=temp;
      }
      getline(themeFile, numExits, ',');
      for (int i=0; i&lt;numExits; i++)
      {
          getline(themeFile, temp, ',');
          currentTheme.exits[i]=temp;
      }
      themeFile.close();
  }
  </code></pre>