Learn about conflicting types for function error c, we have the largest and most updated conflicting types for function error c information on alibabacloud.com
When you use gcc to compile a C program, you may encounter a compilation error of "error: conflicting types for 'function. Literally, the definition and declaration of a function are inconsistent. In this article, I will make a simple analysis of
[Reference the help document of smart appliance control technology. Here we have a very html version, which is very useful for querying, but it cannot be downloaded to CHM version. It cannot be used locally .]
1. # operator not followed by macro
Description: Turbo C's source program error is divided into three types: fatal error, general error, and warning. A fatal error is usually an internal compilation error, a general error that refers to a program's syntax error, a disk or memory
ClassClass is the most common type of reference, and the simplest declarations are as follows;Class Yournameclass{}More complex classes can have the following options;Placed before the keyword class: attribute (attributes) and class modifier (class
Variable scope
Local scope, global scope, file scope
Local Variables : Also called internal variables, declared within the function (including the main function), the scope begins at the declaration of the variable, ending at the end of the
Chapter 1th Structure of the document1. Copyright and version of the statement2. Structure of the header file"Rule 1-2-1" in order to prevent the header file from being repeatedly referenced, a preprocessing block should be generated with the IFNDEF/
mbiguous operators need parentheses-----------ambiguous operations need to be enclosed in parenthesesAmbiguous symbol ' xxx '----------------ambiguous symbolsArgument list syntax error----------------parameter table syntax errorsArray bounds missing-
I. Pre-processing symbols and Conditional compilation
A) You can use the # define command to define some symbols guiding the pre-processor to modify the source code. This is done by the # if, # elif, # else, # endif command.
# Define MACRO1
Using
From: http://wenku.baidu.com/view/01f99435f111f18583d05a47.html
1GCC common errorsI. Error TypeClass 1: C syntax errorError message: line N of the file source. C contains a syntax error (Syntex errror ).Errors of this type are generally caused by C
J2SE 1.5 provides a "Varargs" mechanism. With this mechanism, you can define formal parameters that can match multiple arguments. Thus, it is possible to pass a variable number of arguments in a simpler way. This article describes how this mechanism
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.