title: Using Get() with an Array Structure
body: <p>Hello I do not understand why my <code>storms.get(names[a].hurricaneName, 10);</code> won't work. The program runs with any errors but it does not print out <code>names[a].hurricaneName</code>.
  <br>
  <a href="https://i.stack.imgur.com/4DqvR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4DqvR.png" alt="This is my programs output"></a></p>
  
  <p>Also my input file is <br></p>
  
  <pre><code>Fea        287 8 1975 162 185 130 145 168 8 9  8
  Josh       199 6 1957 78  36  25  75  86  5 2  2
  Malcom     123 4 1995 45  87  63  86  48  4 4  1
  Spinny Guy 299 9 1993 186 145 173 145 148 7 10 10
  Road Run   391 7 1923 156 185 137 175 156 5 4  4
  Hoover     403 5 1946 87  85  87  86  87  2 6  4
  Stephen    109 7 1987 146 148 156 146 176 7 5  4
  Nick       187 4 1926 186 186 86  85  68  5 4  2
  Austin     348 4 1928 86  96  45  83  85  6 2  3
  Jerry      394 5 1956 156 145 184 135 134 7 5  1
  Jacob      689 8 1945 187 176 136 176 157 5 8  3
  Bruce      163 7 1934 156 185 183 54  94  5 2  0
  Ronald     483 5 1937 187 165 148 175 164 8 4  8
  Billy Bob  189 2 1945 67  86  87  56  64  2 2  8
  Caroline   389 5 1987 97  97  57  75  23  5 3  4
  Jim Carrey 892 5 1902 145 176 156 185 154 7 4  7
  Guillermo  239 7 1916 187 87  76  64  85  3 2  8
  Nye        594 5 1974 145 197 184 175 147 4 5  3
  Marvin     782 4 1962 87  67  87  88  74  3 5  7
  Bugs Bunny 903 7 1973 67  54  184 112 129 7 4  4
  Dare Devil 923 7 1973 67  54  184 112 129 7 4  4
  </code></pre>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;iomanip&gt;
  
  using namespace std;
  
  struct Info
  {
      char hurricaneName[11];
      int ID;
      int life;
      int date;
      float avgWindSpeed;
      float avgRainFall;
      int totalTornadoes;
  };
  
  int main()
  {
      Info names[256];
  
      ifstream storms;
      storms.open("storms.txt");
  
      ofstream outfile;
      outfile.open("Results.txt");
      outfile &lt;&lt; fixed &lt;&lt; setprecision(2);
  
  
      //This will count how many lines have information in them or are being used.
      int counter = 0;
      while (storms)
      {
          counter = counter + 1;
          storms.ignore(256,'\n');
      }
      cout &lt;&lt; "There are a total of " &lt;&lt; counter &lt;&lt; " lines being used." &lt;&lt; endl;
      //This is the end of that program
  
      for(int a = 0; a &lt; counter; a++)
      {
          storms.get(names[a].hurricaneName, 10); //This peice of code is suppose to read in the names of each storm which has to be less than 11 characters.
          cout &lt;&lt; names[a].hurricaneName;
      }
  
  
      return 0;
  }
  </code></pre>
  
  <p>The main thing that I wanted that piece of code to do would be to eventually when it is finished to print out all the names of the storms. For example <code>Fea</code>, <code>Josh</code>, <code>Malcom</code>, etc.
  I would really be grateful if someone could explain what I did wrong or where my error is, but in a way that a beginner can understand.</p>