i'm trying to build a program that will read a text file, and take elements from that file, store them into arrays, and then display those arrays. i'm not nearly close to a finished product yet, as i'm in way over my head here. but just with what i have, when i try to run it, just to see how it's working, the input file "data7.txt" is crashing (by which i mean, a windows dialogue box pops up telling me it's not functioning, and it will check for a solution, that thing) it happens each time. with what code i have at the moment, what might be causing this? if it makes any difference, the whole assignment can be found here, in case that gives any clues as to what i'm screwing up. i have no experience with arrays and am overwhelmed. i'm trying to go from top to bottom, but perhaps that doesn't work? i don't know, i'm lost. any advice would be much appreciated. https://webcourses.niu.edu/courses/1..._1/240pgm7.htm
Code:
#include <iomanip>
#include <iostream>
#include <fstream>
#include <ctype.h>

using namespace std;

const int LENGTH = 30;

int family[LENGTH];

int item[LENGTH];

int quantity[LENGTH];

double price[LENGTH];

int buildArrays (int family[], int item[], int quantity[], double price[]);

void printArrays (int family[], int item[], int quantity [], double price[])
{
	int i;
	cout<<family[i]"\n"<<item[i]"\n"<<quantity[i]"\n"<<price[i];
}
int main()
{
	int i;
	int num;





ifstream inFile;

inFile.open( "data7.txt" );

if( inFile.fail() )
{
	cout << "text failed to open";
	exit( -1 );
};

while (inFile)
	{
	buildArrays;
	inFile>>num;
	family[i]=num;
	inFile>>num;
	item[i]=num;
	inFile>>num;
	quantity[i];
	inFile>>num;
	price[i];
	i++;
	printArrays;	
	
	}
	
	
	
	
return 0;
}
the data7.txt file contains this
Code:
3 12345 1 15.95
2 67800 3 50.00
4 32145 2 4.50
6 98765 1 75.00
1 44496 2 11.30
0 67356 4 3.50
5 54862 1 52.50
4 14541 1 4.25
2 64488 2 1.00
0 34945 3 7.40
6 74322 1 6.50
1 39240 10 0.75
3 52525 15 1.00
0 60002 1 12.00
5 31579 2 2.50