I've encountered this kind of conversion many many times.Code:ofstream foo; foo.write(reinterpret_cast<const char *>(&Object), sizeof(ClassOfObject));
write() expects a 'const char *' as its first arguemnt. After casting the object , the char pointer will be pointing to our object , right? how does that happen? how can a 'char' pointer manipulate an object of a different type?
appreciate your help