an_error



I made a program but when I try to compile it gives me this:
$gcc -o main.c
$In file included from stiva.c:3,
from main.c:4:
stiva.h:7: error: redefinition of 'struct stiva'
stiva.h:12: error: redefinition of typedef 'Stiva'
stiva.h:12: error: previous declaration of 'Stiva' was here
stiva.h:12: error: redefinition of typedef 'STIVA'
stiva.h:12: error: previous declaration of 'STIVA' was here
$
this is stiva.h from were the error is
[code]
#define adevarat 1
#define fals 0
#define MAX 256


struct stiva
{
int v[MAX];
int sp;
};

typedef struct stiva Stiva, *STIVA;

STIVA push(STIVA st, int x);
STIVA pop(STIVA st);
int top(STIVA st);
void destroy(STIVA st);
STIVA news(void);
void afst(STIVA st);
char estevida(STIVA st);
char esteplina(STIVA st);
[/code]
thx if the onher parts are needed tell me

.



Relevant Pages

  • Re: an_error
    ... stiva.h:12: error: redefinition of typedef 'Stiva' ... stiva.h:12: error: previous declaration of 'Stiva' was here ...
    (comp.os.linux.misc)
  • Re: an_error
    ... stiva.h:12: error: redefinition of typedef 'Stiva' ... stiva.h:12: error: previous declaration of 'Stiva' was here ...
    (comp.os.linux.misc)
  • Re: an_error
    ... stiva.h:12: error: redefinition of typedef 'Stiva' ... stiva.h:12: error: previous declaration of 'Stiva' was here ...
    (comp.os.linux.misc)
  • Re: an_error
    ... stiva.h:12: error: redefinition of typedef 'Stiva' ... stiva.h:12: error: previous declaration of 'Stiva' was here ...
    (comp.os.linux.misc)