A
anonymous
I have a Lex file containing definitions of 2 structures like:
%{
struct a {...};
struct b
{
struct a i;
...
};
struct a x[10];
struct b y[10];
....
%}
In main program I have external declarations
/* main.c */
extern struct a;
extern struct b;
extern struct a x[];
extern struct b y[];
When I try to compile and run I am getting
'Warning:Useless keyword or type name in external declaration'
and
'Invalid use of undefined type : struct a'
Is there anything wrong in the external declarations
of the structure?
%{
struct a {...};
struct b
{
struct a i;
...
};
struct a x[10];
struct b y[10];
....
%}
In main program I have external declarations
/* main.c */
extern struct a;
extern struct b;
extern struct a x[];
extern struct b y[];
When I try to compile and run I am getting
'Warning:Useless keyword or type name in external declaration'
and
'Invalid use of undefined type : struct a'
Is there anything wrong in the external declarations
of the structure?