evilheart
Member level 3
Again it is my first 8051 project , i am using C in programming , kiel as a compiler
i had a problem with one of the programs ,
#include <At89x52.H>
#include <string.h>
#define SIZ 17
#define p P0
typedef struct {
char name[SIZ];
int no;
int rank;
} worker;
void sendstruct(worker w);
main()
{
P3=0; P0=255;
worker w1;
worker w2 ;
worker m1;
this is the first part of the program ,
when i build the project it gives me a lot of of error messages but i think that most of them appear because it doesn't define the structure (worker) , i don't know why , i reviewed some of the C books i had , but i didn't find any syntax problem.
please any help will be valuable.
WB _ MAIN. C( 18 ) : error C141: syntax error near 'worker'
this is the first error , C( 18 ) is the line of "worker w1;"
i had a problem with one of the programs ,
#include <At89x52.H>
#include <string.h>
#define SIZ 17
#define p P0
typedef struct {
char name[SIZ];
int no;
int rank;
} worker;
void sendstruct(worker w);
main()
{
P3=0; P0=255;
worker w1;
worker w2 ;
worker m1;
this is the first part of the program ,
when i build the project it gives me a lot of of error messages but i think that most of them appear because it doesn't define the structure (worker) , i don't know why , i reviewed some of the C books i had , but i didn't find any syntax problem.
please any help will be valuable.
WB _ MAIN. C( 18 ) : error C141: syntax error near 'worker'
this is the first error , C( 18 ) is the line of "worker w1;"