VS2013 use and configuration issues after successful installation

Source: Internet
Author: User

650) this.width=650; "title=" 1.png "src=" Http://s5.51cto.com/wyfs02/M01/7F/0A/wKioL1cQ0HaxNvyoAABVnaTZtKI990.png " alt= "Wkiol1cq0haxnvyoaabvnatztki990.png"/>

VS is currently a popular compiler, in many large companies, the Microsoft platform for the background development environment programming is used by this compiler. As an entry-level novice, mainly write some C, C + + aspects of the code, the personal use of VS2013, which is through a comparison of several compilers, feel 2010 and 2013 of the optimization effect better, on the other hand, I do not like to try too fresh platform, so has been using this. Recently many people ask me VS2013 open, write good code starts to run up always problems, code clearly no problem, but always either error, or out of warning. Now I'm going to share some of my experience with VS, including some basic configuration, the entry level skip the first four steps, the big God directly skip this blog ...

First, turn on vs.

First step: Create a new project:>

650) this.width=650; "title=" 2.png "src=" Http://s2.51cto.com/wyfs02/M00/7F/0D/wKiom1cQ00bgv_xbAACUl3Bgtzs382.png " alt= "Wkiom1cq00bgv_xbaacul3bgtzs382.png"/>

Of course, you can also click File----> New-----> Item in the upper right corner (you can view the corresponding shortcut key)

Step Two: Select items

650) this.width=650; "title=" 4.png "src=" Http://s2.51cto.com/wyfs02/M02/7F/0A/wKioL1cQ1N_xJbJcAAFrj3z0pWc076.png " alt= "Wkiol1cq1n_xjbjcaafrj3z0pwc076.png"/>

Here to the C project for example, for the new person, choose an empty project, or your project will default to add dozens of sub-files, the name and location of their own settings, the directory is best for English. Of course if you are building a project under Win32, you will need to manually select the WIN32 console application-----> Empty Project, then click OK.

Step three: Create a new file

650) this.width=650; "title=" 5.png "src=" Http://s1.51cto.com/wyfs02/M01/7F/0D/wKiom1cQ1nTj1MUVAAJlLb-x4Dc390.png " alt= "Wkiom1cq1ntj1muvaajllb-x4dc390.png"/>

Locate Solution Explorer, press the picture above, and if not, click View and select Solution Explorer. After selecting the file, C + + file, change the filename suffix to. C

650) this.width=650; "title=" 6.png "src=" Http://s3.51cto.com/wyfs02/M01/7F/0A/wKioL1cQ2AXCNkeBAAEivlc4bEU417.png " alt= "Wkiol1cq2axcnkebaaeivlc4beu417.png"/>

Fourth Step: Basic configuration (add line number and color font settings)

Click Tools-----> Options

650) this.width=650; "style=" Float:none; "title=" line number. png "src=" http://s5.51cto.com/wyfs02/M01/7F/0A/ Wkiol1cq2zmxsyq0aagei7c0yzo830.png "alt=" Wkiol1cq2zmxsyq0aagei7c0yzo830.png "/>

650) this.width=650; "style=" Float:none; "title=" font. png "src=" http://s5.51cto.com/wyfs02/M02/7F/0D/ Wkiom1cq2ohajdb6aaf5zvfbgeu923.png "alt=" Wkiom1cq2ohajdb6aaf5zvfbgeu923.png "/>

Fifth Step: Functional Testing

I wrote a simplest C program, 650) this.width=650; "title=" test. png "src=" http://s1.51cto.com/wyfs02/M00/7F/0D/ Wkiom1cq2srgntsdaabp5j1j2go527.png "alt=" Wkiom1cq2srgntsdaabp5j1j2go527.png "/>

Press F5 or the local Windows debugger on the picture, the result, the program Error!!!

Error message: C4996: ' scanf ': This function or variable could be unsafe. Consider using scanf_s instead. To disable deprecation, use _crt_secure_no_warnings. See online Help for details.

As tested, this type of error is not reported under the VS2010 version, which should be a higher requirement for program security under version 2013.

The amount ... Capable of self-translation, this is VS2013 next advanced detection, such as scanf, strcpy and other functions, are considered unsafe functions, why not safe, you can own Baidu, error messages also have the recommended more secure function, because now can not use, I only say here how to fix.

The default configuration phase is now started. At first I said, do not arbitrarily change the installation directory, follow the directory below me, access to the folder,

C:\Program Files (x86) \microsoft Visual Studio 12.0\vc\vcprojectitems

See below interface

650) this.width=650; "title=" Ne_b7v0%}abjvwg58dltj7l.png "src=" http://s4.51cto.com/wyfs02/M01/7F/0D/ Wkiom1cq2rvdn10daad8pbygc9e892.png "alt=" Wkiom1cq2rvdn10daad8pbygc9e892.png "/>

Open the file Newc++file.cpp, go back to just the error message, find use _crt_secure_no_warnings, in the newly opened Ask price, add macro definition, #define _CRT_SECURE_NO_WARNINGS 1, /c0>

650) this.width=650; "title=" 8.png "src=" Http://s1.51cto.com/wyfs02/M01/7F/0A/wKioL1cQ3ESg1W_jAACM3L7BgMg345.png " alt= "Wkiol1cq3esg1w_jaacm3l7bgmg345.png"/>

Click Save, and you can turn it off.

Then re-build a project, create a new file, you will find that this time by default a line of information.

650) this.width=650; "title=" 9.png "src=" Http://s1.51cto.com/wyfs02/M00/7F/0D/wKiom1cQ3A2AW54LAADTp8qbj1s289.png " alt= "Wkiom1cq3a2aw54laadtp8qbj1s289.png"/>

Now just re-knock the code and run it again. At this time, the black box appears, at least the compiler passed, try to enter a number, click Enter.

......

What the? Disappeared after a click? Was it more than a few times? Try again.

All right! Not the hand is too fast, but originally so, how to do?

Add a line of code system ("pause") before return. Considering the rigor of the program, add the header file #include<stdlib.h>, this header file will be used in the future, there is no need to worry about trouble.

System ("pause"); Tested, there are problems with the VS compiler. You need to add this statement and the associated header file.

Such as:

650) this.width=650; "title=" 11.png "src=" http://s3.51cto.com/wyfs02/M02/7F/0D/wKiom1cQ3deTHcAUAACBalao1pY244.png "alt=" Wkiom1cq3dethcauaacbalao1py244.png "/>

Try again at this time, it should not be a problem!

Finally, in your compiler interface, press F1, in the case of networking, will automatically jump to Microsoft launched on the VS community platform, here will not regularly update some of the latest information, of course, there are some of your current version vs some of the use of skills.

All of these are basic operating configurations, other features such as environment variables, parameter lists, etc. for enthusiasts to develop themselves.

This article is for the first time use vs compiler person to use, do not have to do other purposes!

This article is from the "11321490" blog, please be sure to keep this source http://11331490.blog.51cto.com/11321490/1764293

VS2013 use and configuration issues after successful installation

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.