• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1461
  • Last Modified:

What is the voidp datatype?

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.
1 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.
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


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now