User Profile

Collapse

Profile Sidebar

Collapse
darkfire
darkfire
Last Activity: Apr 18 '07, 06:42 PM
Joined: Mar 7 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • darkfire
    started a topic Reference Parameters in C
    in C

    Reference Parameters in C

    Reference parameter can they be done in C?

    As in:

    I have struct:
    Code:
    typedef struct listNode listNode;
    struct listNode {
        struct listNode *forLink;
        struct listNode *bacLink;
        struct listNode *firLink;
        char *info;
    };
    Now I'm trying (trying being the operative word here) to write a Pop() (which obviously has to remove the last Node...
    See more | Go to post

  • darkfire
    started a topic Templates in C
    in C

    Templates in C

    Is it possible to implement function templates in C?
    See more | Go to post

  • darkfire
    replied to Set of Strings in Struct
    in C
    Hm okay right but with

    newNode(_inc, _new, _old, _next) or whatever, _inc represents the first string in the array or set or whatever. Later in expand I have to be able to add more string to it, sometimes append an array of strings to the end of it. That is why I'm using the double pointers. Is there anyway to do what I want, because with your above solution once the node is create the array is pretty much set.
    See more | Go to post

    Leave a comment:


  • darkfire
    replied to Set of Strings in Struct
    in C
    Hmmm no that won't work (and it doesn't I tried) char **increment is supposed to be an array of strings. Node->increment = _inc (as far as I understand) if you cast to get the types right will simply force Node->increment to become an array of chars.

    Edit: Typo...
    See more | Go to post

    Leave a comment:


  • darkfire
    started a topic Set of Strings in Struct
    in C

    Set of Strings in Struct

    Right, I have to, for a assignment write a translator that translates Linear Temporal Logic formulae into Buchi automata in C.

    Now part of what I have at the moment is:
    Code:
    typedef struct Node {
      char *name;
      char **incoming;
      char **new;
      char **old;
      char **next;  
    } Node;
    
    Node *newNode(char *_inc, char *_new, char *_old, char *_next) {
       Node *node
    ...
    See more | Go to post
No activity results to display
Show More
Working...