jeudi 1 juillet 2021

Create a block object that holds a content file [closed]

I was planning to create a block object. Here is my sample reference for creating it. Thank you!

void* raw = malloc(blocksize);

            std::shared_ptr<void> sharedData(raw, free) ;

//          std::cerr << "Processing block: " << blocks << "\n";
            len = fread((void*)raw, sizeof(char), blocksize, stdin);

            if (len != blocksize)
            {
                goto end;
            }

            last_range = ranges;

            Data *data = new Data(sharedData, blocksize, raw, len);

Aucun commentaire:

Enregistrer un commentaire