C++ Practical
Binary File Processing Snippet-10
Copy Records
Question: Given a binary file TELEPHON.DAT, containing records of the following class Directory
class Directory
{
char name[20];
char address[30];
char areacode[5];
char phonenum[15];
public:
void register();
void show();
int checkcode(char AC[])
{ return strcmp(areadcpde, AC); }
};
Write a function COPYABC() in C++ that would copy all the records have areacode as "123" from TELEPHON.DAT to TELEBACK.DAT