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 redefining putchar

#include <reg51.h>
#include <stdio.h>

........
lcd code
........

char putchar(char c) {

lcd_rs = 1; //data
lcd_rw = 0; //write

lcd_en = 1;
lcd_data = c;
lcd_en = 0;

if (!lcd_busy_check())
error_blink();
else
return (c);
}

I get an error :
Compiling...
..\8051_TRIAL_1\MAIN.C
..\8051_TRIAL_1\MAIN.C(92): Error: Type redefined: putch
..\8051_TRIAL_1\MAIN.C(92): Warning: Parameter declaration different: parameter 1
Complete

I checked the header stdio.h, it has putchar defined as :

#define putchar(c) putch(c)
...
int putch(int);

What can i do?

0