What is the difference between C language programming in Linux and window?

Source: Internet
Author: User
What is the difference between C language programming in Linux and window?-General Linux technology-Linux programming and kernel information. For details, refer to the following. Different compilers have different levels of support for C/C ++ standards. We found that g ++ and gcc on Linux have better standard support than VC. As shown in the preceding answer:

For example, win: for (int I = 0; I <10; I ++)
Linux: int I;
For (I = 0; I <10; I ++)

It is incorrect. Obviously, the first one is compliant with the new C ++ standard. In fact, VC6.0 supports a lot of queries.

For (int I = 0; I <10; ++ I)
{
}
I = 10;

Such a statement is correct in VC6, but does not comply with the C ++ standard, because the I scope is only within the for loop, and the I in the following sentence is not defined. That is: the example above in the new standard is incorrect, but VC6 is correct.

I don't know the gcc and g ++ versions used in linux?

Generally, c/c ++ programs that comply with the standard can be compiled successfully on Windows and linux and get the correct results.
Related Article

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.