M
Matt
I'm writing code for the apple 2 which requires that I use the pre-ansi
k&r C dialect. This is apparently not allowed:
"foo",
"bar",
"more",
"stuff"
};
Aztec C65 v3.2a 6-30-86
char *choices[] = {
^
ERROR 38: no auto. aggregate initialization allowed
So I did this:
char *ch1 = "bar";
....
char **choices;
choices[0] = ch0;
choices[1] = ch1;
....
But surely this can't be the way people used to do things? What if it
was choices[100][] instead of choices[4][]? Seems tedious.
Matt.
k&r C dialect. This is apparently not allowed:
char *choices[] = {----<
"foo",
"bar",
"more",
"stuff"
};
Aztec C65 v3.2a 6-30-86
char *choices[] = {
^
ERROR 38: no auto. aggregate initialization allowed
----<
So I did this:
char *ch0 = "foo";----<
char *ch1 = "bar";
....
char **choices;
choices[0] = ch0;
choices[1] = ch1;
....
----<
But surely this can't be the way people used to do things? What if it
was choices[100][] instead of choices[4][]? Seems tedious.
Matt.