Compiler appears conflicting types for XXX summary of the causes of the error

Source: Internet
Author: User

The literal translation is XXXX has a conflict! For example, the mistake found today is a low level!

The reason for this error is that the function is written after the main function without first declaring it! It should be declared first, then defined, and if only defined, the definition must be written above the main function. By looking at the data, we have summarized some common causes of such errors:

1, because the function declaration is not done first, and the function is after main ().

2, the header file is circular reference, in reference to consider clearly the order of inclusion

3. The header file declaration and definition parameters are slightly different, for example:

The header file declares void Hanlder (const char * buf);

write void Hanlder (char * buf) at definition time;

This is going to happen conflicting types for error problem

Compiler appears conflicting types for XXX summary of the causes of the error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.