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



Appendix A Using Visual Studio 2019 (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 2019 Enterprise Edition.Getting started466090621030Figure A.1 Visual Studio 2019 start screen00Figure A.1 Visual Studio 2019 start screenLaunch Visual Studio. The process will depend upon the version of Windows you are running. This will bring up the Visual Studio 2019 start screen as illustrated in Figure A.1.Select “Create a new project” on the start screen. If you are in Visual Studio already you can select File -> New -> Project ->. This will bring up the Create a new project wizard.Type in desktop into the search menu and then select Windows Desktop Wizard as shown in Figure A.2.483235619760Figure A.3 Windows Desktop Project00Figure A.3 Windows Desktop Project483235635Figure A.2 Create a new project wizard00Figure A.2 Create a new project wizardEnter the name of your new project in the Project name field. For illustrative purposes we have called our project ‘Sample1’. Click the Create button. Figure A.3 shows the window that is now displayed.In the Application type dropdown make sure that Console Application (.exe) is selected. Under the Additional Options section check the Empty Project checkbox. This is shown in Figure A.3. When you have the settings as shown above click the OK button. We now have created a Solution. As you may recall, a solution is comprised of one or more projects (i.e., applications).479843459755Figure A.4 New file window00Figure A.4 New file windowUnder File -> select New -> File. A new file dialog box will appear as shown in Figure A.4.Under Installed be sure to click on Visual C++ and in the center section select C++ File (.cpp) as shown in Figure A.4. Now press the Open button.By 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.5.4622800Figure A.5 Visual Studio with Sample1.cpp00Figure A.5 Visual Studio with Sample1.cpp4673603771265Figure A.6 Including source file00Figure A.6 Including source fileNow 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.6.You 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.7. 453416-349199Figure A.7 Unsaved source code00Figure A.7 Unsaved source codeNotice the use of the colored text in relation to the syntax highlighting. Your code should look something similar to Figure A.7.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. Visual Studio will automatically save your file and start the build process.471170631825Figure A.9 Output window00Figure A.9 Output windowNotice 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.9.As 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. The console window is shown in Figure A.10.-19050Figure A.10 Console window00Figure A.10 Console windowCongratulations! 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