Im having trouble loading data to arrays in C++. I have to make a phone book where the first thing you do is click on a button called load and then load two files, one called names.txt the other called phonenumbers.txt, to two parallel arrays. here is what i got so far. I'm so lost, any help will do.
[code]
int index = 0;
ifstream name_database;
name_database.open("F:\\pb\\names.txt");
name_database >> names[];
ifstream phone_database;
phone_database.open("F:\\pb\\phonenumbers.txt");
phone_database >> phone_number[];
for (index=0;index<5;index++)
names[index] = index+1;
[code]
ive declared my arrays globally, im programming in windows using borland