Using Visual Studio 2017 (VS) - Learn By Doing Books



Appendix A - 2017Using Visual Studio 2017 (VS)As previously mentioned, VS is also referred to as an Integrated Development Environment (IDE XE "IDE" ). The material presented here is simply designed to help get you started using this very powerful and professional tool. Before we get too far, please keep in mind to relax and have fun with this package. Remember, any time you spend learning how to use this application will be well spent. The following illustrations were done using Microsoft Visual Studio 2017 Enterprise Edition.Getting startedLaunch Visual Studio. The process will depend upon the version of Windows you are running.45815353054300458153378143Figure A.1 New project windowFigure A.1 New project windowSelect File -> New -> Project -> and click on the arrow to the left of Visual C++. The results are shown in Figure A.1.472440798830Figure A.2 Windows desktop projectFigure A.2 Windows desktop projectOn the left hand side under Visual C++, select Windows Desktop. In the center section, select Windows Desktop Wizard. Enter the name of your new project in the Name field. For illustrative purposes we have called our project ‘Sample1’. Click the OK button. Figure A.2 shows the window that is now displayed.You will now see the Windows Desktop Project. Under the Additional Options section, select Empty Project and unselect Precompiled Header and Security Development Lifecycle (SDL) checks. The correct options are shown in Figure A.2. Click the OK button. center287020Figure A.3 New file window00Figure A.3 New file windowUnder File -> select New -> File. A new file dialog box will appear as shown in Figure A.3.Under Installed be sure to click on Visual C++ and in the center section select C++ File (.cpp) as shown in Figure A.3. Now press the Open button.456248661353Figure A.4 Current Visual Studio state00Figure A.4 Current Visual Studio stateBy default, the name of your new file is called Source1.cpp. Immediately save this file to the same directory as your solution but give it a new name as we did, Sample1.cpp. Visual Studio should now appear as shown in Figure A.4.Now go to the File menu option and select the Move Sample1.cpp into -> Sample1 project. This is directly above the Exit menu option at the bottom of that menu. The menu system is shown in Figure A.5.495935633730Figure A.5 Moving source code into project00Figure A.5 Moving source code into projectYou are now in the editor and the file Sample1.cpp has been added to this project.Type in the program as shown in Figure A.6. 472440159385Figure A.6 Unsaved source code00Figure A.6 Unsaved source codeNotice the use of the colored text in relation to the syntax highlighting. Your code should look something similar to Figure A.6. Notice an asterisk appears to the right of the filename indicating the file has not yet been saved.Under the Debug menu option, select Start without Debugging.Notice once you have started the build process the Output window at the bottom of Visual Studio is providing status information. The Output window is shown in Figure A.7. 4707910Figure A.7 Output window00Figure A.7 Output windowAs you can see your application has launched a new console application and displays the text “Hello World” as shown below. Remember, to terminate the console application you need to press any key. Congratulations! You have now just entered in, compiled, built and executed your first C++ program! ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download