Write a function in C++ to read and display the detail of all the users whose status is ‘A’ (i.e. Active) from a binary file “USER.DAT”. Assuming the binary file “USER.DAT” is containing objects of class USER, which is defined as follows:
class USER {
int Uid; // User Id
char Uname[20]; // User Name
char Status; // User Type: A Active
public:
void Register( ); // Function to enter the content
void show( ); // Function to display all data members char Getstatus( )
{ return Status; }
};