Mail Archives: djgpp/1996/10/11/03:47:14
A.Appleyard wrote:
> This program:-
> 1 #include<stdio.h>
> 2 typedef struct{char *codeno; char*name;} craft;
> 3 craft dsub[128]={
> 4 [1] {"CH79","Aphanistor"}, ...
> 9 main(){}
> produced these errors:-
> t$.cc:5: parse error before `['
> t$.cc:5: warning: aggregate has a partly bracketed initializer
> t$.cc:6: parse error before `[' ...
Francois Charton <deef AT pobox DOT oleane DOT com> replied:-
> Yes you can, your program is right, but its name is wrong... In GNU C you
> can give the elements in any order, specifying the array indices or
> structure field names they apply to. This extension is not implemented in
> GNU C++.
Why isn't it!? I can't use C; my big program (rather than the above test)
also uses classes etc.
- Raw text -