Home > Back-end >  The MAIN. C (60) : error C267: 'printf' : the requires the ANSI - style prototype
The MAIN. C (60) : error C267: 'printf' : the requires the ANSI - style prototype

Time:11-15

#include
#include
Sbit ADDO=P1 ^ 5;
Sbit ADSK=P1 ^ 4;

Unsigned long ReadCount (void)
{
Unsigned long Count;
unsigned char i;
ADSK=0;//can make AD (PD_SCK buy low)
Count=0;
While (ADDO);//AD conversion not over yet, wait, or to read
for (i=0; i<24. I++)
{
ADSK=1;//PD_SCK buy high (sending pulse)
The Count=Count<1; Come falling edge//the variable Count left one on the right side of zero padding
ADSK=0;//low PD_SCK buy
If (ADDO) Count++;
}
ADSK=1;
Count=Count ^ 0 x800000;//25 a falling edge pulse, transform the data
ADSK=0;
Return (Count);
}

Void main ()
{
P0=0 XFF;
While
{
ReadCount ();
Printf (" % d \ n ", ReadCount ());
}

}
Please help to see why. The MAIN C (60) : error C267: 'printf' : the requires the ANSI - style prototype

CodePudding user response:

#include
The printf function declarations in the header file, do not write words will go wrong,

CodePudding user response:

Thank you very much! Right now
  • Related