1. Open the input file and read the records into an array of Student structures.
ID: 654041 • Letter: 1
Question
1. Open the input file and read the records into an array of Student structures. You'll need to create this array dynamically, because you won't know how many records there are until you start reading the file itself. The data from each record in the file should be stored in one Student structure (i.e. one array slot per student record)
Here's my code:
studt*ptr;
ptr = new studt[n];
ipf >> new studt[n];
this is not compiling - the error message I'm getting is:
"error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'studt *' (or there is no acceptable conversion)"
Explanation / Answer
you are stroing the binary value into other data type object
you can solve this by using type casting
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.