Re: Adding the ability to add functions into structures?



Eric Sosman a écrit :
jacob navia wrote:

[...]
2) I define the interface functions:
typedef struct {
        // Returns the number of elements stored
        int (*GetCount)(ArrayList &AL);


    Whatever this language is, I doubt it's topical on
comp.lang.c.

Yes, replace the "&" by  "*".
lcc-win32 supports "&" as in C++, but it can be
replaced by "*". References are just pointers that
can never be NULL. A pointer will do too.
.



Relevant Pages

  • Re: Adding the ability to add functions into structures?
    ... I define the interface functions: typedef struct {// Returns the number of elements stored int; ... References are just pointers that can never be NULL. ... Why do you keep posting code that, while almost C, will only work on a single compiler, on a single platform? ...
    (comp.lang.c)
  • Re: Adding the ability to add functions into structures?
    ... I define the interface functions: typedef struct {// Returns the number of elements stored int; ... Whatever this language is, ... References are just pointers that can never be NULL. ... single compiler, on a single platform? ...
    (comp.lang.c)
  • Re: Operator overloading in C
    ... All development of C as an independent language has ... making any changes or improvements to the standard ... The lack of a counted string data structure, ... Pointers can't be used for arg1 or arg2. ...
    (comp.std.c)
  • Re: pointers?
    ... There's absolutely nothing abstract in pointers. ... Take the C array: if you write ... To the assembly language programmers who were the first generation adopters of C, this mental mapping was very tight. ... Forth gained the most traction on machines like the IBM 1130 and the Data General Nova. ...
    (comp.lang.forth)
  • Re: another day, another patch ...
    ... windows weenies started to graduate from being teenage videogame players into application programmers and system managers. ... Would you blame the language? ... But you are then making that code REALLy ugly and dangerous (an non portable because assumption of 32 bit pointers). ...
    (comp.os.vms)