How to print a certain line on a line in c++?(file handling)

I have this problem set and I need help guys. for example i have a file.txt with this contents:

Employee Number: 14-6790
First Name: Kevin
Last Name: Caliboso

if i use getline(ifstream,string) it will show the line "Employee Number: 14-6790"
how can I print only the 14-6790 without getting the "Employee Number: " ??


Thank you in advance
Employee Number: 14-6790


you can input entry line into a string by using a getline and then use std::find to find the ':' colon, and use the obtained iterator to retrieve the rest of the string into another string which would then be printed out.
can you give me an example sir?
no, you won't learn anything if I give you complete code.
instead you should post your code and hope someone helps you out what next.
okay sir thank you
Topic archived. No new replies allowed.