oops, sorry about that, in my code i needed a string array instead of a char array. regarding your code, why not just make the data retrieval process a function and then call it whenever necessary, passing in a filename and a pointer to the array you want the data stored in. also you have two counters, one of which is un necessary.