I'm having a severe problem here. I need to read data from a sequential file and my programmer friend tells me i need to use an "array of structs" but he is being incredibly vague about this particular syntax. so, let's say I have this:
#include<iostre am>
#include<fstrea m>
#include<cstdli b>
using namespace std;
struct myData
{
______________
let's say I have a known 10 records in this file that I need to read into the members of this struct. How do I declare this "array of structs", if this is indeed possible?
Thanks
~Atusko
#include<iostre am>
#include<fstrea m>
#include<cstdli b>
using namespace std;
struct myData
{
int employeeID;
char lastName[15]
char firstName[10];
float payRate;
};______________
let's say I have a known 10 records in this file that I need to read into the members of this struct. How do I declare this "array of structs", if this is indeed possible?
Thanks
~Atusko
Comment