My program compiles fine but I get a segmentation fault when reading in a dat file.... I had it in a loop but I thought thats what was causing the error, it doesnt even cout anything either. heres the code:
indata.open("lib/assign4.dat3");
cout << county[7];
indata >> county[8];
cout << county[8];
indata >> state[8];
indata >> date[8];
indata >> population[8];
indata >> county[9];
indata >> state[9];
indata >> date[9];
indata >> population[9];
indata >> county[10];
indata >> state[10];
indata >> date[10];
indata >> population[10];
indata.ignore();
getline(indata, name[11]);
indata >> county[11];
indata >> state[11];
indata >> date[11];
indata >> population[11];
<< moderator edit: added code tags: [co[u][/u]de][/co[u][/u]de]
>>