Solution to the problem that the identifier cannot be found when calling a function in main in C language:
Just put the defined function before the main function. The method body of () needs to be written before the main function.
Execution in C language always starts from the main function, no matter where the main function is, it must start from it. If the function you define is after the main function. And if there is no declaration of the calling function before the main function, then the system will not recognize the function called in the main function, and there will be an error message. If the defined function is before the main function, then never mind.
Specifications for the use of identifiers in C language:
1. Identifiers consist of letters (A-Z, a-z), numbers ( 0-9), underscore "_", and the first character cannot be a number, but can be a letter or underscore. For example, correct identifiers: abc, a1, prog_to. 2. C language keywords cannot be used as user identifiers, such as if, for, while, etc.
3. The length of the identifier is determined by the compilation system on the machine. The general limit is 8 characters (Note: The 8-character length limit is the C89 standard. The C99 standard has expanded the length. In fact, most industrial standards longer).
4. Identifiers are case-sensitive, that is, they are strictly case-sensitive. Generally use lowercase for variable names and uppercase for symbolic constants.
5. Identifier naming should be such that "the meaning is known by the name", for example, length, sum, and total (sum).
The above is the detailed content of C language cannot find identifier when calling function in main. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver CS6
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
