473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to fix the error for this program

#include <REGX51.H>
#include "delay.h"
#include "lcd.h"
#include "keypad.h"

#define relay P1_7;
void main()
{
int first_key,second_key,third_key,fourth_key;
P1=0X00;

P2=0x00;
P3=0xff;
LCD_INIT();

LCD_STRING("PASSWORD BASED");
delay_sec(1);
LCD_CMD(PUTLINE2);
LCD_STRING("LOCKING SYSTEM");

LCD_CLEAR();
LCD_STRING("ENTER PASSWORD:");
delay_sec(1);
LCD_CLEAR();
while(key_get()==NOKEY);
first_key=key;
LCD_STRING("*");


while(key_get()==NOKEY);
second_key=key;
LCD_STRING("*");


while(key_get()==NOKEY);
third_key=key;
LCD_STRING("*");


while(key_get()==NOKEY);
fourth_key=key;
LCD_STRING("*");

while(1)
{
if((first_key==1)&&(second_key==2)&&(third_key==3) &&(fourth_key==4))
{
LCD_CLEAR();
LCD_STRING("Correct Password");
P1_2=1;
delay_sec(2);
}
else
{
LCD_CLEAR();
LCD_STRING("Incorrect Password");
delay_sec(2);
}

} }
this is the output
xc.c(3): warning C318: can't open file 'lcd.h'
xc.c(4): warning C318: can't open file 'keypad.h'
XC.C(14): warning C206: 'LCD_INIT': missing function-prototype
XC.C(16): warning C206: 'LCD_STRING': missing function-prototype
XC.C(16): error C267: 'LCD_STRING': requires ANSI-style prototype
Target not created
May 1 '16 #1
0 1361

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: muser | last post by:
Can anyone run this program through their compiler or if they can see a logical error please point it out. I have my tutor working on it at the moment but I would rather a less ambigious response...
3
by: Yang Zhang | last post by:
Here is a program: ///////////////////////////////////////////////// #include <iostream> using namespace std ; class A { int a ; A(const A& aA) { a=aA.a ; cout<<"copy constructor...
10
by: Protoman | last post by:
Could you tell me what's wrong with this program, it doesn't compile: #include <iostream> #include <cstdlib> using namespace std; class Everything { public: static Everything* Instance()
12
by: GRoll35 | last post by:
I get 4 of those errors. in the same spot. I'll show my parent class, child class, and my driver. All that is suppose to happen is the user enters data and it uses parent/child class to display...
9
by: goosen_cug | last post by:
This program is a "Sequential List" class I want to do the Union Operation,Intersection Operation of the Set.But this program have a problem: /////////////////////////// Compiling... Set.cpp...
3
by: koutoo | last post by:
I have a code that writes to 2 seperate files. I keep getting a "list index out of range" error. The strange part is that when checking the files that I'm writing too, the script has already...
12
by: broli | last post by:
#include<stdio.h> #include<stdlib.h> struct point { double x, y, z;
30
by: Anarki | last post by:
The following is the program i am trying to compile //restrict.c #include <stdio.h> int main() { char arr = "Qualifiers" char * restrict p = arr; int i = 0; for(; i < 10; ++i)
1
by: jobie | last post by:
i am currently reading Francis Glassborow's You can do it .i tried building this program using vs2008 // first program typed in by // on #include "playpen.h" #include <iostream> int...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.