Where is the error? (eclipse + cdt)

Source: Internet
Author: User
Where is the error (eclipse + cdt)-Linux general technology-Linux programming and kernel information, the following is a detailed description. Program
Main ()
{
Int I, j, k:
Printf ("\ n ");
For (I = 1; I <5: I ++)
For (j = 1; j <5; j ++)
For (k = 1; k <5: k ++)
{
If (I! = K & I! = J & j! = K)
Printf ("% d, % d, % d \ n", I, j, k );
}
}
Errors in eclipse
Make all
Building file: ../main. c
Invoking: gcc c Compiler
Gcc-O0-g3-Wall-c-fmessage-length = 0-MMD-MP-MF "main. d "-MT" main. d "-o" main. o "".. /main. c"
../Main. c: 2: warning: the default return type is 'int'
../Main. c: In the 'main' function:
../Main. c: 3: Error: expected '=', ';', 'asm 'or' _ attribute _ 'before': 'token
../Main. c: 5: Error: expected '; 'before': 'token
../Main. c: 7: Error: 'K' not declared (used for the first time in this function)
../Main. c: 7: Error: (even if it appears multiple times in a function, each undeclared identifier
../Main. c: 7: Error: only one report is reported in the function .)
../Main. c: 7: Error: expected '; 'before': 'token
../Main. c: 10: Warning: Implicit declaration function 'printf'
../Main. c: 10: Warning: Implicit declaration is incompatible with the built-in function 'printf'
.../Main. c: 12: Warning: In a function with returned values, the control flow reaches the end of the function.
Make: *** [main. o] Error 1


I don't know what went wrong.

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.