#include<reg51.h> #include<string.h> #include<stdio.h> #define lcd_data P1 sbit rs=P2^0; sbit rw=P2^1; sbit en=P2^2; unsigned char n[5]="hello"; unsigned char m[]="welcome rakesh"; void cmd_lcd(unsigned char); void write_lcd(char); void delay(unsigned int); void lcd_int() { cmd_lcd(0x38); cmd_lcd(0x0c); cmd_lcd(0x01); cmd_lcd(0x80); } void cmd_lcd(unsigned char x) { x=lcd_data; rs=0; rw=0; en=1; delay(50); en=0; }
void write_lcd(char s) {
s=lcd_data; rs=1; rw=0; en=1; delay(500); en=0; } void delay(unsigned int temp) { unsigned int i,j; for(i=0;i<255;i++); for(j=0;j<temp;j++); }
void main() { void lcd_int(); void write_lcd(n); void delay(500); void cmd_lcd(0x01); void delay(100); void write_lcd(m); void delay(100); }
this code shows following error: Build target 'Target 1' compiling lcdc04.c... LCDC04.C(50): error C161: 'n': formal parameter ignored Target not created
please help me in clearing this...
Dan,
I'm very confused with what you say.
You said that what Jameel was telling the OP was wrong, but then you provide a link which actually supports what he said.
That is:
Passing the wrong type of parameter. Jameel said "you call write_lcd with n. n is the name of an array of characters. what c does is pass the address of the array. and your function write_lcd expects a single character. not an address to an array of characters." Lint reports "Type mismatch". Not totally correct, but a reasonable start.
Incorrect position of void. Jameel said "(Rakesh mate. look at the void.)". We can only guess how much was understood with that, but along the right lines.
And yes, I acknowledge that there are other errors/warnings that Lint picked up.
Please don't fall into that distasteful habit that certain other posters have on this forum.
"You said that what Jameel was telling the OP was wrong, but then you provide a link which actually supports what he said."
No, Jameel is stuck on function invocation; that is, calling. There is no "calling" being performed. The code's incorrectness hasn't even allowed lint to complain about a function call (yet).
... we had also never heard of here before this thread ...
Stop already. I can't take any more. Your logic is, as always, totally infullable.
You must be a right wag at gatherings.
Or not old and wise enough not too, Google searches cut both ways.
Now that is a proper and good answer ;-)
"Your logic is, as always, totally infullable."
Quiet odd for me to ask, but "infullable"? Even I cudn't do it that bad. Is that even a word?
Try "infallible".
yo're friend,
Zeusti.
<quote>Even I cudn't do it that bad<quote>
I DID NOT SPEAK ANY OF THIS!
This fourem is going down the hill very bad.
Still someone at temps to impersonanate me!
POEPLE WHO NO ME U MUST NO IT WAS NOT ME
Always yo're freind.
(Can you turn off auto-correct with IE10? It thinks it knows how to spell better than me)
"(Can you turn off auto-correct with IE10? It thinks it knows how to spell better than me)"
Random Zeusti don't need auto-correct.
Random Zeusti have very "interesting" spelling and grammar on some days and almost perfect grammar and spelling on other days - all depending on mood. Normally the worst spelling/grammar when taunting Tamir.
<quote>Random Zeusti don't need auto-correct.</quote>
Too right. I like to choose my own quality.
But you remind me. Where is Tapir these days? I miss our extreme intellectual discourses.
For a long time now I have only woken when he posts or when someone pretends to be me. I really HATE that latter one.
Dear sock-puppet, if you think you that's a coherent argument, you're even more deranged than I suspected. If you don't: what possessed you to post it?
if you think ... blah blah blah ...
It was an appropriate response to self-indulgent crassness.
yeah, thank you sir, now I really understood my mistakes.. Actually the code i put forward lacked rechecking.. now onwards I'll recheck my code many times and then only will post.. as a beginner i didn't knew how to make well use of this forum. now I think I can do better.
thank you for your encouragement for beginners like me in this forum..
thank you jameel for your sincere and valuable reply and advice. when i eliminated the VOID in main fn, i got the program error free!!!
"when i eliminated the VOID in main fn, i got the program error free!!!"
You needed a lot more than to remove your extra "void" in main() to get your program error-free.
"when i eliminated the VOID in main fn, i got the program error free!!!
No you didn't.
"You must be a right wag at gatherings."
Some people here got beaten at work or at home and this is their place to recover their self-esteem by bullying others. That is why they are so hostile and condescending to others asking questions.
The good thing is that they are fairly easy to spot and you just need to learn to ignore them.
Somehow I find it hard to believe that the individuals you refer too have low esteem or ego, their IQ puts them in smartest-guy-in-the-room category, so I again doubt they are beaten at work, or can't manipulate or plot around that. If you're beaten at work you find a different job, if you're beaten at home you go live some place else, if you're an ineffective team player you pick a different sport.
I can see why there might be hostility if their job was out-sourced to someone who can't tie their shoe laces, or formulate a coherent question.
So do you get beaten because you cheat on your husband, or do you cheat because he beats you?
their IQ puts them in smartest-guy-in-the-room
If this forum ever implements registration it should also require every member to state their IQ rating. Maybe then implement a filter to weed out responses from people who are just not smart enough.
Ian.
(IQ 147)
But maturity and IQ don't go hand-in-hand.
Absolutely correct. And nor do human interaction capabilities go hand-in-hand with IQ.
View all questions in Keil forum