class fileSystem{
private:
node1 obj1[2097];
node2 obj2[8192];
node3 obj3[8192];
};
When I write
fileSystem* obj = new fileSystem();
ofstream os("file.dat", ios::binary);
os.write( reinterpret_cast<char*>(*obj), sizeof(*obj) );
in main.
I get:
error C2440: 'reinterpret_cast' : cannot convert from 'fileSystem' to 'char *'
1> Conversion requires a constructor or user-defined-conversion operator, which can't be used by const_cast or reinterpret_cast