Sounds like you mean to output to the txt file after you input each character? Maybe try conio or another library. But for it to actually "update" the text file you have to close it and reopen the text file. I guess you could use the library also to close the txt file and reopen each time here is a snippet that you might be looking for?
Yeah, I was going to answer with some file io code too, but wasn't sure. That is what I thought he meant, but he very well could mean is it possible to run a program that takes input at the terminal and writes it into notepad for him in real time. The first is easy to do, but the latter I'm not sure if it is possible.