Write a definition for function COUNTDEPT( ) in C++ to read each object of a binary file TEACHERS.DAT, find and display the total number of teachers in the department MATHS. Assume that the file TEACHERS.DAT is created with the help of objects of class TEACHERS, which is defined below:
class TEACHERS { int TID; char DEPT[20]; public: void GET() { cin>>TID;gets(DEPT); } void SHOW() { cout<<TID<<":"<<DEPT<<endl; } char *RDEPT(){return DEPT;} };CBSE12D-2017