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

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

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

SublimeText3 English version
Recommended: Win version, supports code prompts!

Atom editor mac version download
The most popular open source editor