CodePudding user response:
Variables defined function declaration before the call, such as the void main (void) on the bottomCodePudding user response:
Variable getdata, array dispbuf [] no definition, suggests the building Lord hurriedly to learn C language,CodePudding user response:
If it is a global variable you less files, if not you can't declare...CodePudding user response:
First sound next useCodePudding user response:
Getdata, define a variable first and then you can use,For example, unsigned int getdata
After the proposal writing code to a format:
//include the header file
XXXXXX
//define a global variable
XXXXXX
//declare external variable
XXXXXX
//seed function declaration
XXXXXX
//the main function
Void main ()
{
//variable definition
XXXXXX
//peripheral initialization
XXXXXX
Infinite loop
While (1)
{
XXXXXX
}
}
//each seed function
XXXXXX
I hope it can help you,
CodePudding user response:
You put the function declarationCodePudding user response:
Basic knowledge of code look at a book clubCodePudding user response:
File or less variables defined in the function below the definition or not