I see. In the future, when you have a better handle on databases and encrypting user information, I suggest you do it that way. I am a bit rusty on my c++, there are many on this forum much more well versed than I am. Here is a link to an article that talks about File I/O processes in c++.
In their example, they output whatever is found in the text file to the screen. Instead, you could format the text file on two lines and have the username on the first and the password on the second, and read the two lines into two separate variables then compare those values against what the user input. Hope this is helpful, please ask for clarification on anything I didn't make clear.