Re: Adding the ability to add functions into structures?



Eric Sosman wrote:
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

In this case I think you have forgotten that Jacob is the implementor, and thus correctly avoiding the users namespace.


--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
 "show options" at the top of the article, then click on the
 "Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
.



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?
    ... I define a forward declaration to the object ... typedef struct _ArrayList ArrayList; ... either an uppercase letter or another underscore ...
    (comp.lang.c)
  • Re: pointers to structures
    ... > (server is defined in the include as ... > typedef struct { ... > int fdin, fdout; ... the broken "Reply" link at the bottom of the article. ...
    (comp.lang.c)
  • Re: size of a byte and int?
    ... > for breaking your code. ... unique prefix to all names in that library. ... prefix, underscore, and then the normal name, as in "hsh_find". ... the broken "Reply" link at the bottom of the article. ...
    (comp.lang.c)
  • Re: size of a byte and int?
    ... > for breaking your code. ... unique prefix to all names in that library. ... prefix, underscore, and then the normal name, as in "hsh_find". ... the broken "Reply" link at the bottom of the article. ...
    (comp.arch.embedded)