I have a bit of a problem and need help I am new to C++ I know I am in the dark, anyway I have an assignment due and I am stuck. here it goes: "write a program to create a file call it names.dat. This file will contain the name and salary for 15 people. After the file is created, use it to input values into two arrays (Name and Salary). Then using these two arrays, list all the names with salary greater than or equal 30000." so my problem is I can create the file and declare the arrays, but I can not figure out how to fill the arrays with the data from the sequential data file. Any takers? post a replay or email kalman@mdchq.com
Comments
:
I am assuming you are using TC++ 3.0 You will first have to open the file for reading then use the "fscanf()" function to read the formatted content of the file opened. If you want a detailed description about the TC++ function type 'fscanf' on your TC++ editor, point the cursor on it and press Ctrl + F1 key and the online help would come up.
Hope this helps you