Saturday, May 22, 2010

C++ questions?

Here is my assignment, and the design I have to use. I've already made the classes.





Design for Program 3 Client Code


1) Declare grad student pointer and allocate temporary grad student


2) Initialize student counter


3) Open the input file


4) Use end of file loop to read in students from file (use temporary dynamic student)


a. count the number of students in the file


5) Deallocate the temporary graduate student


6) Close input file


7) Allocate a dynamic array of grad students of the proper size


8) Re-open input file


9) Use end of file loop to read in students from file


a. read each one into the dynamic student array


10) Close input file


11) Traverse the dynamic student array, print each one's data to the screen


12) Open the input file FOR WRITING using an ofstream


13) Traverse the dynamic student array, print each one's data to the file


14) Close the output file stream


15) Deallocate the dynamic student array





How do I traverse the input file using the temp dynamic student?

C++ questions?
what VS are you running? Managed or non-Managed?





if 6 use printf to show the data to screen, but then make a temp FILE and load the dynamic array into it then print the temp file.


No comments:

Post a Comment