typedef struct transition* Transition;
typedef struct state* State;
struct state {
int goal;
int transition_cnt;
Transition transitions; // points to a transition[]
};
struct transition {
char el;
State next_state;
};
struct transition t;
struct state s;
s.goal = 0;
s.transition_cnt = 1;
// I'd like to assign a one-element array {t} to the transitions pointer of s
s.transitions = &{t}; // this raises an error 'expected expression' in xcode
Last active
September 12, 2018 23:04
-
-
Save zinosama/bd3b9d3111a50b3a75ec352a6dcde6a6 to your computer and use it in GitHub Desktop.
C question about array of structs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment