This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

undefine identifier

<main>
#include<reg51.h>
#include<delay.h>
#include<temp.h>
//#include<code.h>
#include<counter.h>
#define unsigned long int pdata cont[256]
void main()
{ int tmp; counter(); while(1) { tmp=P0; compare(tmp);

}

}

<temp>

void temp(int x, int y)
{ int t; //tmp=P0;

for(t=0;t<320;t++)
{ P3=0x02;
P1=x;
delay(100);
P3=0x01;
P1=y;
delay(100);
}

}

<code>

#define A 0Xfc
#define B 0X60
#define C 0Xda
#define D 0Xf2
#define E 0X66
#define G 0Xb6
#define I 0Xbe
#define J 0Xe0
#define K 0Xfe
#define L 0Xf6
#define M 0X03
#define N 0X9f
#define O 0X25
#define P 0X0d
#define Q 0X99
#define R 0X49
#define S 0X41
#define T 0X1f
#define U 0X01
#define V 0X19

<counter>

#define unsigned long int pdata cont[256]

int counter()
{ int z; //unsigned long int pdata cont[256]; for(z=255;z>0;z--) {cont[z]=z;}
//return(0);
}

<compare>
#define unsigned long int pdata cont[256];

void compare(int k)

{

int l; for(l=255;l>=0;l--) {if(cont[l]==k) {temp(l,l);} }
}

error is
counter.h(8): error C202: 'cont': undefined identifier
in counter.h

help me to remove this error.

0