Are employee name and job name a single character?
Because if you enter "John" as employee name it will:
1) Store 'J' as employee name
2) Store 'o' as first job name
3) store 'h' as second job name
4) Store 'n' as third job name
5) Ask you for the name of fourth job.
Use std::string found in <string> header to store strings (names)
It should flush the buffer. That what is endl for.
this may be causing your issue
It cannot. First of all input and output buffers are two distinct buffers. Second: output buffer is always flushed before any input operation. Third: buffered operations should not have any difference in behavior from unbuffered: buffering should be transparent.