Hey all! I have polynomial programming project that I'm doing where I need to read a set of numbers from a file where each set of numbers are written in the format
<coefficient> <exponent>
on each line in the file. First and foremost I've set up a structure called Term which consists of a float Coeff, and a int Expn and have made an array called Terms[10] to store each polynomial term. I'm pretty bad when it comes to developing a loop to read from a file and I haven't had any experience with structures yet so I'd like some help for reading each set of numbers into the array if you can provide! The file is called 'poly.txt' and the ifstream is called 'fp'. Thanks in advance!
Jess