I am having trouble accepting input from a text file. My program is supposed to read in a string specified by the user and the length of that string is determined at runtime
You might consider simply looping over calls to getc().