[c++] How to read a line from a text file in c/c++?