View the step-by-step solution to:

I am trying to wri-te a c++ programme that searches for a match in the .txt file. example of possible content in .txt file hjb893 9 nmk326 3 vim423 0...

I am trying to wri-te a c++ programme that searches for a match in the .txt file.


example of possible content in .txt file


hjb893 9

nmk326 3

vim423 0

jok710 4



in my main() on my .cpp program. I am opening the file. I then ask for the employee id to be entered. such as 'vim423.'

If there is a match then I want to be able to see display the number in the next column (number of years the employee has worked for).

If there is not match, then I need to be able to cout <<"EMployee does not exist" << endl;


please provide a full working code.

Top Answer

Output of the program is... View the full answer

Output.JPG

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online