FArchive* Archive = ... // create an archive instance if (Archive->IsSaving()) { // archive is being used to write data } else { // archive is being used to read data }
FArchive* Archive = ... // create an archive instance if (Archive->IsSaving()) { int32 MyData = ... // some data to modify // modify MyData *Archive << MyData; // write MyData to archive }These examples are using the Unreal Engine 4 (UE4) package library, as FArchive is a class provided by UE4.