File Reading and Writing

Hi! Thanks for helping me. I need to write a program (in C++) that reads the file Employee.dat as input and then outputs to 4 different files which are Managers.dat, Marketing.dat, Developers.dat, and Testers.dat. Each of the output files contains the name of the employees of its category.