File stream I/O basics

So in my program I have a text file that stores data as follows:

Grant Chase
45.98
Checking

Harry Truman
337.05
Savings

etc...

How exactly do I allow the user enter an EXACT string of text (their name, e.g. "Harry Truman"), search the file for it, and display the line direct AFTER that line?

e.g. Enter your name: "Harry Truman", Your account balance is: $ "337.05"


Second similar question, how would I prompt the same thing (i.e. ask for exact name), search file, and display THAT name as well as the lines directly proceding it?

e.g. Enter your name: "Harry Truman"
"Harry Truman
337.05
Savings"

I'm a little confused about getline and strings in these cases, could someone please show me a template for this?
Sorry, I wanted to improve my chances of it being answered. Your link in the one was VERY helpful btw
Topic archived. No new replies allowed.