Hello everyone, I am trying to get information from a file into arrays. The text file goes something like this:
John Doe 8087793254 021489
Jane Plain 8087746587 120286
Larry Red 8746589874 022565
and so on.
I want to put the first names in an array for first names, the last names in an array for last names and the numbers in each of their own arrays and i need help putting them in the arrays.
Thanks for the help
what are you trying to do here ? why are you passing a multidimensional arrays of char ? unsignedshort DisplayInfo(char fname[][size], char lname[][size], int phone[11], int birth[7])
* Your function name is misleading. Are you trying to display the contents of a file or to read from a file ? please do use a more descriptive name.
Well, you could construct your function heading like this:
1 2
void functioName(string firstname[], string lastname[],
int phonenumber[], int birth[], size_t size)