What is the voidp datatype?

Posted on 2011-04-21
Last Modified: 2012-05-11
Hello all.

I want to download a zip file on the iPhone and unzip it straight from the downloaded data. I'm writing in Objective C but the "library" I'm using is minizip, which is written in standard C.

This library makes use of the type unzFile, which is a typedef of voidp.
Also at a certain point it uses a filestream which is of the type voidpf.

Can anyone explain to me what these datatypes are? Are they typedefs for void pointers or something?

Thanks in advance.
Question by:Snapples
    LVL 53

    Accepted Solution

    It's not a standard type, but the naming suggests that it's probably a pointer-to-void, ie.

            typedef void* voidp;

    But you can double-check that by looking for the definition in the header files for the library.
    LVL 32

    Expert Comment

    the definitions are

    #ifdef STDC 
       typedef void const *voidpc; 
       typedef void FAR   *voidpf; 
       typedef void       *voidp; 
       typedef Byte const *voidpc; 
       typedef Byte FAR   *voidpf; 
       typedef Byte       *voidp; 

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
    Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
    The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now