It just crashes out.
{
int i,j;
ifstream input;
input.open("carpark.txt");
{
for (i=0;i<j;++i)
{
input >> employee[i].spotnumber;
input >> employee[i].driver_name;
input >> employee[i].car_reg;
}
while (!input.eof())
j++;
}
}