>after the username is entered the message press any key appears but no mark is displayed
Your braces are misplaced. Here's the code with proper indentation:
>Does this line search for string1 in the file, or the file in string1?
You wrote code and don't know what it does? The member function find is called on behalf of string1 with the argument filename.c_str(). So it's searching for filename in string1.
I got the feeling straight away that you have no idea what you're doing, and now I'm pretty sure of it. Perhaps you should work with pseudocode until you're comfortable with the design of your program. That way you won't be confused with piddling details until the time is right.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.