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

problem in string display

#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...

Parents
  • When making a statement and someone else says it is wrong, then it might be an idea to invest some real time trying to figure out what is going on. Or take one step back and post a question "in what way?" or "how do you mean?" instead of just pushing ahead with a post repeating the claim "void write_lcd(n); // calling write_lcd with n ".

    "Is it not likely that Jameel did the same? Maybe, just maybe, his eye is not yet as well tuned to seeing problems in badly/incorrectly formatted code as you."

    The problem wasn't that he missed an important issue with the line. The problem was that he came back again, a second time claiming that a call was made. Thereby starting a debate instead of taking the chance of learning one of the intricacies of the C language.

Reply
  • When making a statement and someone else says it is wrong, then it might be an idea to invest some real time trying to figure out what is going on. Or take one step back and post a question "in what way?" or "how do you mean?" instead of just pushing ahead with a post repeating the claim "void write_lcd(n); // calling write_lcd with n ".

    "Is it not likely that Jameel did the same? Maybe, just maybe, his eye is not yet as well tuned to seeing problems in badly/incorrectly formatted code as you."

    The problem wasn't that he missed an important issue with the line. The problem was that he came back again, a second time claiming that a call was made. Thereby starting a debate instead of taking the chance of learning one of the intricacies of the C language.

Children