We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am using c8051F226 and Cx51 compiler..I received this error and warning...
*** WARNING C206 IN LINE 9 OF LCD2.C: 'lcdcmd': missing function-prototype
*** ERROR C267 IN LINE 9 OF LCD2.C: 'lcdcmd': requires ANSI-style prototype
void main() { lcdcmd(0x38); //THIS IS MY LINE 9 lcdcmd(0x0E); lcdcmd(0x01); lcdcmd(0x06); lcdcmd(0x80); lcddata('A'); lcddata('B'); lcddata('C'); }
I have read the error description... Can anybody tell me what's wrong with this and what should i do in order not to get this error??
Thanks
"you need to add a function ... if you do it before main, you do not need a prototype"
Correct.
Probably time for the OP to have a re-read of his/her 'C' textbook: Like many other programming languages, 'C' requires that everything must be declared before it can be used.
"if you add it afterwards, then you do [need a prototype]"
Also if the definition is in a separate file.
There is one case where you can get away without providing an explicit declaration - it is left as an excercise to the student to consider when this might be...
Hey fiddeley geek,
smile mate.
someone over this side of the room can see you on there webcam!
mister slavender is wanting his work in tomorrow after-dindins. have you got it all ready for him?
come back good buddey. 10-4 yea ha!
what you doin? smile mate.
you read some of the messages on here?
wow.
saddo geeks or what?
PLEASE,
This is a professional forum, not a chat room for children.
Eriko
So you've found one of your classmates also here; better beware that mister slavender (your teacher, I presume?) isn't also watching this thread...
It's happened before; eg,
" href= "http://www.8052.com/forum/read.phtml?id=8648">www.8052.com/.../read.phtml
It's quite funny that people never think their teachers can google - or actually know the better forums for problems related to their classes.
Huh???!!! Have we met each other, Mr Jothum Patrarajer??? I am Fiddy Geeky not Fiddeley Geek!!! Anyway who is Mister Slavender?? and i don't even have a webcam here...Err maybe you got the wrong person...
Thanks guys... I've got what you mean...I think he got the wrong person...
I think he got the wrong person...
yea right!
its your move to buy the drink in the kanteen mate, or will you pretend not to know me there too?
Since when i bought anyone a drink in the canteen mate!!! Which country are you from??
A country where people are not legally named "Fiddy Geeky" maybe.
Well i am waiting for him to reply... Seems like he ""KNOWS" me very well....
If you want to convince the forum, just switch to your real name and post a reference.
If you want to convince Jothum Patrarajer, exchange email addresses and go private.
yer not going to deny me again mate are you?
Just coz you owe me a corfee!
Oh... Sorry guys... I really got the wrong person... haha.. sorry...
My name is Fiddy Geeky
My friends know me by a lot of other names becoz i always run away when it is my turn to buy the drinks!
haha... haha ... haha...