Hello I'm not that familiar with Dynamic Arrays, I need to create one that is of type class, that reads data from a file, I've gotten up to the point where I've allocated the array to the appropriate size but I just don't know how to read data from a file into the array. In the interest of space I have only included parts of the code:
<Problem *problems;//created in class file as private data member>
problems = new Problem[n];
for(int i=0; i<n; i++)
problems[n]=//need to read in data from file here
Any suggesions/help would be greatly appreciated as I don't really understand how dynamic arrays are initialized.