Re: Adding the ability to add functions into structures?



Eric Sosman a écrit :
jacob navia wrote:

[...]
For instance:

1) I define a forward declaration to the object
typedef struct _ArrayList ArrayList;


    Have you forgotten that the identifier `_ArrayList'
is off-limits?

    "All identifiers that begin with an underscore and
    either an uppercase letter or another underscore
    are always reserved for any use."
    -- ISO/IEC 9899:1999 section 7.1.3 paragraph 1

Yes, you are right. Just put
	typedef struct tagArrayList

Sometimes I use _ because is shorter
.



Relevant Pages

  • Re: Adding the ability to add functions into structures?
    ... I define a forward declaration to the object ... typedef struct _ArrayList ArrayList; ... either an uppercase letter or another underscore ...
    (comp.lang.c)
  • Re: Adding the ability to add functions into structures?
    ... typedef struct _ArrayList ArrayList; ... either an uppercase letter or another underscore ... the broken "Reply" link at the bottom of the article. ...
    (comp.lang.c)
  • Re: marshalling struct to class problem
    ... typedef struct CK_SLOT_INFO { ... unsigned char slotDescription; ... public class CK_SLOT_INFO ... my method declaration ...
    (microsoft.public.dotnet.framework.interop)
  • Re: OCI and Postgres - Compile error
    ... Database systems are jealous beasts --- they don't like sharing relations with the same program. ... declaration 'typedef struct varlena text' ... has a previous declaration as `typedef oratext text' ... have an appropriate newsgroups line in your header for your mail to be seen, ...
    (comp.lang.c.moderated)
  • Re: Need a GURU!!! Im stuck.
    ... typedef struct XXX_ELEMENT_tag ... UINT8 param; ... semicolon and delete the next declaration. ... have an appropriate newsgroups line in your header for your mail to be seen, ...
    (comp.lang.c.moderated)