int j = 0;
while ((c = fgetc(file1)) != EOF) 
     currentLine[j++]= (char)c;
currentLine[j] = 0;

so I should null terminate after the while loop ends right?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.