Here is how I would approach it:
1. Define a class with the properties: Name, Gender, Status, Condition
2. Define a list/array to hold a collection of the class
3. Open first file and load the list
4. Open second file and update the list
5. Write the list in a new file.
ref:
C - File I/O (read/write) - TutorialPoint[
^]
ref:
C - Arrays - TutorialPoint[
^]
ref:
C++ Classes and Objects - W3 Schools[
^]