ok so i narrowed it down to my loadFile function wher i read the file in

Code:
void BST::loadFile()
{
	Key key;
	cout << "Enter the the file location" << endl;
	cin >> inFileName;
	inFile.open(inFileName.c_str());
	if (!inFile.is_open())  //test for file
	{
		cerr << "Cannot open file: " << inFileName << endl;
		getche();
	}
	while(!inFile.eof()) //loop through untill end of file
	{ cout << "hi" << endl;
		inFile >> key.data;
		
		if(key.data == NULL)
			return;
		else
			insert(key);

		cout << name << endl; 
 
	}// end obtain info 
	cout << "hi" << endl;

	inFile.close();//close infile
}
it displays the first "hi" b4 the inFile >> key.data and thast where it stops.

what is wrong there??