Looking at what you had at the link you provided ...
if the data in your file is all pre-validated ...
1) if the C strings are all less than 30 char's long (just one word, no spaces in 'word')
2) id#'s all fit into an unsigned short
3) if the data in the file is perfectly regular with idNuum on 1st line, name on next line, a valid float on 3rd line, (or all data has just whitespace between each data field)
then you easily could hande like this:
unsigned short int IDnum;
int fillAryFromFile( const char* fname, char Customer ary, int max_size )
int size = 0;
ifstream fin( fname );
if( fin )
size < max_size &&
fin >> ary[size].IDnum &&
fin >> ary[size].name &&
fin >> ary[size].salesCustomer
if( size == max_ size )
cout << "You have reached max size.\n";
// else ... if reach here ...
cout << "There was a problem opening file.\n";
return -1; // flag value for file open error