Error c2220: Warning is regarded as an error-no "object" file is generated

Source: Internet
Author: User

Http://blog.csdn.net/cay22/article/details/5613625

The cause of this error is:CodeThe page is in English, while the code page in our system is in Chinese.

Solution:

1. Start Microsoft Visual Studio 2005, choose File> open> select CPP, and save. Re-openProgramFile running, this error no longer appears.

If not, then 2

 

2. if the preceding error cannot be removed, you can also click the project and right-click Select properties-> Configure properties-> C/C ++-> General, change the option "warning as error" to "no ". You can!


The first method is invalid, the second method is effective, but the warning is ignored.

It was later found that the error was caused by the comparison of int type and size_t type.

Vector <Foo> foovec;

Int Index = 0;

..

For (Index = 0; index <Foovec. Size (); ++ Index)

{...}

Change the index type to size_t.

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.