using Read and Write methods to write to a Binary File





This video tutorial teaches you how to use read and write methods with binary file to read and write blocks of data and this tutorial explains how to save an object to a file using write method and then reading and using that object using read method.

source code for this tutorial

#include 
#include 
#include 
using namespace std;

class Person{
char name[80];
int age;
public:
    Person(){
    strcpy(name,"noname");
    age = 0;
    }
   Person(char *name,int age){
    strcpy(this->name,name);
    this->age = age;
    }

    void whoAreYou(){
    cout << "hi am "<
                  
Back To Top