title: Read floating point numbers into a dynamically allocated while increasing the size of the array while reading the file
body: <p>I am trying to read floating point numbers from a file into a dynamically allocated 2D array. I am using c++.</p>
  
  <p>In my .txt file the elements of a row are separated by a tab space each and each row starts on a new line.</p>
  
  <p>My question is - </p>
  
  <p>Can I increase the size of my array based on the no. of elements (rows and columns) present in the file? If so, please suggest a way to do it.</p>
  
  <p>I thought of writing the no. of rows and columns on the first line of the text file and reading them in the beginning to set the limits of the loop which will allocate the space for my array. Is there a better way to do it, perhaps based on the formatting of the text file? This way, I think it will be closer to a streaming data kind of a scenario. </p>
  
  <p>Thanks in advance.</p>
  
  <p>Akhil</p>