






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Click File\New\Project (ctrl+shift+N) to get a New Project dialog box. Select Other Project Types\Visual Studio Solutions in the left pane. Select Blank Solution in the right pane. Add a solution name and browse for a location, then click OK. This will bring up Solution Explorer with the new solution.
3. Right click on the solution in the Solution Explorer and select Add\New Project. This will bring up the Add New Project dialog box. 4. Select C++ in the left pane and select a project type in the right pane, e.g., Win32 Console Application, Windows Forms Application, or Win32 Project. 5. Enter a solution location by typing or browsing (if the path you type does not exist it will be created). 6. Enter a name for your project (will reside in a subdirectory in your workspace by default – change by editing the location). 7. Click OK. This brings up the Application Wizard dialog. Select Application Settings. 8. Select Console application and Empty project. 9. Click on OK – this creates a directory holding a solution file, intellisense database file, and a user options file
Right click on project and select Add/Add New Item
implementation file.
Now you are ready to enter code Note: adding a new file creates a blank file in the project directory
Right click on project and select Add/Add Existing Item Browse through directories until you find the file you want. Select it and click OK Note: adding an existing file to a project does not copy or move any file. It simply adds the path to the selected file into the project settings. Be aware that if you change this added existing file in the IDE editor, it will change the original back in its source folder. This is not the way the C# editor works. You can make a copy, using Windows Explorer, and add the copy to the project directory. That, of course, means that you now have two versions of the file. Be careful!
Click Build\Build Solution or right click on project or solution and select build or rebuild By default, if you select build it will build all projects in the solution. If you select Project Only/Build, you will build just the selected project. Warnings and errors are shown in the bottom Output window. Fix these and rebuild. Double click on warnings and errors to go to the problem location in source code
drag and drop. A click on that will start an execution
Click Project\Properties to get a tabbed dialog box. Click on Debug tab and enter Command arguments for the command line Click OK
Click Project\Properties to get a tabbed dialog box. Expand the C/C++ tab and select Preprocessor Add to existing Preprocessor definitions by typing a comma and your definitions Click OK This is a good way to define the TEST_MODULENAME string that determines whether your Module’s test stub is compiled or not. Each project, except for the Executive module’s has one of these test definitions so that, when you run the project, the module’s test stub runs.
Step over: F10 or click on Debug\Step Over Step into: F11 or click on Debug\Step Into Single step by over, through, out of, or run to cursor, by clicking on buttons on the debug toolbar. You can figure out what each of the icons means by letting the cursor rest for a moment on an icon. A tool tip will pop up with a short description of the resulting action. You may have to add the run to cursor option from Tools\Customize\Debug and select and drag the run to cursor icon to the debug part of the menu. Add or remove break points by left clicking in the left margin of the text editor at the break line. Step through break points with F5. Add watches by clicking in the watch window that appears (by default at the bottom left of the IDE) when you begin stepping. If you don’t see watch window, click on Debug\Windows\watch. You can click on Tools\Customize to get a tabbed dialog box. Select toolbars and check Debug (you should only need to do this once) and select anything you want on the debug toolbar.
appear in a window, outside the IDE. You can get a table of help contents by selecting that tab at the bottom left of the help window. You can search the local and online resources by typing in a search query in the search bar at the top of the right pane in the help window. Be sure to select the filtering you want before you search.
is a great way to learn about someone else’s code. Help files are hypertext and you can usually find what you want with some link following.
In the default windows layout, you can toggle between solution explore (view of your solution, its projects, and their files) or class view (view of all the classes in the solution, along with their methods and attributes). If you don’t see Solution Explorer or Class View, select View\Solution Explorer of View\Class View. You can select from a variety of toolbars (Tools\Customize\toolbars), but normally you don’t have to do that, as the IDE presents to you toolbars that are appropriate for your selected activities.
Export Settings. You can return to the default IDE window layout by selecting Window\Reset Window Layout. A note about Solution Layout:
Figure 1. – Add Blank Solution
Figure 2. – Add a Win32 Project
Figure 8. – Add Linker Input to Expand Wild Cards on Command Line Figure 9. – Runtime Library and Exceptions
Figure 10. – Tabs and Spaces