I am getting an error for void main() function.. Please help me. I am using AT89C51.
Actually, it is giving me error in every line of main function. my code is as follows. Plz help me. I tried changing sequence also. Now giving error in void initialise_serial_com(void)
#include<reg51.h> #include<string.h> #include<absacc.h> #include<stdlib.h> #include<ctype.h> #define buffer 110 sbit R1 = P2^7; sbit R2 = P2^6; sbit R3 = P2^5; sbit wpt = P2^4; sbit buzz = P2^3; void read_notification(); void SMSString(unsigned char *text); void delete_msg(void); void store_msg(unsigned char msg_array[]); void check_auth_no(unsigned char msg_array[]); void check_msg(); void tx0(unsigned char x); void wrong_pass(); unsigned char msg_no; unsigned char MyBuff[]; bit NewMessage = 0; bit TI_flag = 0; bit flag=0; unsigned char MyBuff[20], k = 0; unsigned char abc; unsigned char code Response[] = "+CMTI"; unsigned char store[10]; unsigned char Mob_no[]="8956112239"; unsigned char pass[]="123456" void initialise_serial_com(void) { TMOD=0x20; SCON=0x51; TH1 = 0xFD; TL1 = 0xFD; TR1 = 1; }
unnecessary code has been deleted.
Look at the line preceding initialise_serial_com: There is a missing ";".
ohh... yes... thank you very very much..!!
error 267: 'elseif': Requires ANSI-style prorotype.