VS2012 's C + + programming problem

Source: Internet
Author: User

Level Two exams C + + we have to do some examples of our vs programming in a variety of languages, but with c++6.0 Some of the programming rules are different, below is how we should use vs2012 to solve C + + programming problems, and there are some errors to be solved.

First, create an empty project, as follows:

Then add the new item in the source file:



finally Input Code (note: vs - there is no. h for this kind of thing, change to "#include <iostream>" and use the standard namespace "UsingNamespace std;", in addition, some of the header files should be changed slightly, such as math.h to Cmath).

Such as:

But debugging when the error, as follows:

Precompiled header files from previous versions of the compiler

By querying, simply change the precompiled header-precompiled header to not use precompiled headers in the project properties:

Run as follows:

Note: If you always jump out after running, you can use shortcut keys Ctrl+f5 (equivalent to " start execution (but not debug) ").

VS2012 's C + + programming problem

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.