Re: Style convention question



on 3/9/01 9:59 AM, Mark Mielke at mark mark mielke cc wrote:

> This should be in the form:
> 
> #ifdef __cplusplus
> #  define DECLARE_STRUCT(A)    struct A
> #else
> #  define DECLARE_STRUCT(A)    typedef struct A A
> #endif
> 
> DECLARE_STRUCT(A);
> DECLARE_STRUCT(B);

There's no need to do this ifdef. "typedef struct A A;" is allowed in C++
and has the same effect as "struct A;".

    -- Darin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]