Including a C header which declares a variable called "new"?

Posted by StackedCrooked on Stack Overflow See other posts from Stack Overflow or by StackedCrooked
Published on 2010-04-19T12:53:39Z Indexed on 2010/04/19 13:03 UTC
Read the original article Hit count: 161

Filed under:

I'm trying to use the OpenCA library in a C++ application. However, when including the file pki_x509_data_st.h the following code fragment is encountered:

typedef struct pki_x509_callbacks_st {

    /* ---------------- Memory Management -------------------- */
    void * (*new)  (void    );
    void   (*free) (void *x );
    void * (*dup)  (void *x );

This won't compile because of the "new" pointer declaration.

How can I make it work?

© Stack Overflow or respective owner

Related posts about c++