You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cppcx/collections-c-cx.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ In a C++/CX program, you can make free use of Standard Template Library (STL) co
10
10
11
11
The Windows Runtime defines the interfaces for collections and related types, and C++/CX provides the concrete C++ implementations in the collection.h header file. This illustration shows the relationships between the collection types:
12
12
13
-

13
+

14
14
15
15
- The [Platform::Collections::Vector class](../cppcx/platform-collections-vector-class.md) resembles the [std::vector class](../standard-library/vector-class.md).
Copy file name to clipboardExpand all lines: docs/cppcx/obtaining-pointers-to-data-buffers-c-cx.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ In the Windows Runtime the [Windows::Storage::Streams::IBuffer](/uwp/api/windows
10
10
11
11
The following diagram shows a XAML image element, whose source is a [Windows::UI::Xaml::Media::Imaging WriteableBitmap](/uwp/api/windows.ui.xaml.media.imaging.writeablebitmap). A client app that's written in any language can pass a reference to the `WriteableBitmap` to C++ code and then C++ can use the reference to get at the underlying buffer. In a Universal Windows Platform app that's written in C++, you can use the function in the following example directly in the source code without packaging it in a Windows Runtime component.
12
12
13
-

13
+

Copy file name to clipboardExpand all lines: docs/ide/cpp-linter-overview.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ monikerRange: ">=msvc-160"
16
16
17
17
The IntelliSense code linter for C++ helps developers find and fix common C++ problems right inside Visual Studio. It's based on the same engine that provides C++ IntelliSense, so problems are flagged as soon as you type them.
18
18
19
-

19
+

20
20
21
21
## Find problems
22
22
@@ -38,7 +38,7 @@ When you change the check severity level, it changes how the problem is shown in
38
38
39
39
::: moniker range=">=msvc-170"
40
40
41
-

41
+

42
42
43
43
(The presentation in Visual Studio 2019 is slightly different, but the options are similar.)
Copy file name to clipboardExpand all lines: docs/ide/live-share-cpp.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.date: "05/24/2019"
7
7
8
8
In Visual Studio 2019 and Visual Studio Code, you can use **Live Share** to collaborate on C++ projects in real-time. With **Live Share** another person can edit and debug your code without having to install your project or any of its dependencies. You see each other's edits as they occur, and each edit is tagged with the name of the person who made it.
9
9
10
-

10
+

11
11
12
12
## Live Share host and guests
13
13
@@ -27,7 +27,7 @@ The host and guests can use these IntelliSense features:
27
27
- Reference Highlighting
28
28
- Diagnostics/Errors/Squiggles
29
29
30
-

30
+

Copy file name to clipboardExpand all lines: docs/ide/navigate-code-cpp.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Visual Studio provides a suite of tools that you can use to navigate around your
11
11
12
12
Right-click an `#include` directive, and select **Go To Document**. Or, select **F12** with the cursor over that line to open the file.
13
13
14
-

14
+

15
15
16
16
## Toggle Header/Code File
17
17
@@ -21,15 +21,15 @@ You can switch between a header file and its corresponding source file. Right-cl
21
21
22
22
You can navigate to the definition of a code symbol by right-clicking it in the editor and selecting **Go To Definition**, or by selecting **F12**. You can navigate to a declaration similarly by right-clicking to open the context menu, or by selecting **Ctrl+F12**.
23
23
24
-

24
+

25
25
26
26
## Go To
27
27
28
28
**Go To** refers to a set of navigation features that each provide a specific kind of result based on filters you specify.
29
29
30
30
You can open **Go To** with **Ctrl+,**. This action creates a search box over the document you're editing.
31
31
32
-

32
+

33
33
34
34
**Go To** includes these search filters:
35
35
@@ -74,7 +74,7 @@ You can run a text search for anything in your solution with **Find** (**Ctrl+F*
74
74
75
75
**Find** can be scoped to a selection, the current document, all open documents, the current project, or the entire solution. You can use regular expressions and plain text. It also highlights all matches automatically in the IDE.
76
76
77
-

77
+

78
78
79
79
**Find in Files** is a more powerful version of **Find** that displays results in the **Find Results** window. You can search external code dependencies, filter by file types, and more.
80
80
@@ -90,7 +90,7 @@ For more information, see [Find in Files](/visualstudio/ide/find-in-files) in th
90
90
91
91
To find all usages of a symbol in your codebase, place the caret in or just after the symbol, right-click, and then select **Find All References**. You can filter, sort, or group results in many different ways. Results populate incrementally. They're classified as Reads or Writes to help you see what's in your solution as opposed to system headers or other libraries.
92
92
93
-

93
+

94
94
95
95
You group results by the following categories:
96
96
@@ -104,7 +104,7 @@ You group results by the following categories:
104
104
105
105
To filter results, hover over a column and select the filtering icon that pops up. You can filter results from the first column to hide things like string and comment references that you might not want to see.
106
106
107
-

107
+

108
108
109
109
-**Confirmed results**: Actual code references to the symbol being searched for. For example, searching for a member function called `Size` returns all references to `Size` that match the scope of the class that defines `Size`.
110
110
@@ -120,7 +120,7 @@ You can sort results by any column by selecting that column. You can swap betwee
120
120
121
121
You can navigate to the definition of a type in a file, or to type members, by using the **Navigation Bar** that's above the editor window.
122
122
123
-

123
+

Copy file name to clipboardExpand all lines: docs/ide/read-and-understand-code-cpp.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ You can customize the colors by typing "Fonts" in **Quick Launch**, and then cho
23
23
24
24
Right-click anywhere in a source code file and choose **Outlining** to collapse or expand code blocks and/or custom regions to make it easier to browse only the code you are interested in. For more information, see [Outlining](/visualstudio/ide/outlining).
25
25
26
-

26
+

27
27
28
28
When you place your cursor in front of a curly brace, '{' or '}', the editor highlights its matching counterpart.
29
29
@@ -37,11 +37,11 @@ You can add line numbers to your project by going to **Tools** > **Options** > *
37
37
38
38
You can zoom in or out in the editor by pressing the **Ctrl** key and scrolling with your mouse wheel. You can also zoom by using the zoom setting in the bottom left corner.
39
39
40
-

40
+

41
41
42
42
Scrollbar **Map Mode** enables you to quickly scroll and browse through a code file without leaving your current location. You can click anywhere on the code map to go directly to that location.
43
43
44
-

44
+

45
45
46
46
To turn on **Map Mode**, type "map" in the **Quick Launch** search box in the main toolbar and choose **Use scroll map mode**. For more information, see [How to: Track your code by customizing the scrollbar](/visualstudio/ide/how-to-track-your-code-by-customizing-the-scrollbar).
47
47
@@ -75,13 +75,13 @@ If there is an error in your code, you can hover over it and **Quick Info** will
75
75
76
76
When you call a function, **Parameter Info** shows the types of parameters and the order in which they are expected.
77
77
78
-

78
+

79
79
80
80
## Peek Definition
81
81
82
82
Hover over a variable or function declaration, right-click, then choose **Peek Definition** to see an inline view of its definition without navigating away from your current location. For more information, see [Peek Definition (Alt+F12)](/visualstudio/ide/how-to-view-and-edit-code-by-using-peek-definition-alt-plus-f12).
83
83
84
-

84
+

85
85
86
86
## F1 Help
87
87
@@ -91,19 +91,19 @@ Place the cursor on or just after any type, keyword or function and press **F1**
91
91
92
92
**Class View** displays a searchable set of trees of all code symbols and their scope and parent/child hierarchies, organized on a per-project basis. You can configure what **Class View** displays from **Class View Settings** (click the gear box icon at the top of the window).
93
93
94
-

94
+

95
95
96
96
## Generate graph of include files
97
97
98
98
Right click on a code file in your project and choose **Generate graph of include files** to see a graph of which files are included by other files.
99
99
100
-

100
+

101
101
102
102
## View Call Hierarchy
103
103
104
104
Right click on any function call and view a recursive list of all the functions that it calls, and all the functions that call it. Each function in the list can be expanded in the same way. For more information, see [Call Hierarchy](/visualstudio/ide/reference/call-hierarchy).
105
105
106
-

106
+

Copy file name to clipboardExpand all lines: docs/ide/writing-and-refactoring-code-cpp.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Visual Studio provides several tools to help you write, edit, and refactor your
14
14
15
15
IntelliSense is a powerful code completion tool that suggests symbols and code snippets for you as you type. C++ IntelliSense in Visual Studio runs in real time, analyzing your codebase as you update it and providing recommendations. As you type more characters, the list of recommended results narrows down.
16
16
17
-

17
+

18
18
19
19
Some symbols are omitted automatically to help narrow down the results. For example, when accessing a class object's members from outside the class, you will not be able to see private members by default, or protected members (if you are not in the context of a child class). You can adjust the filtering by using the buttons at the bottom.
20
20
@@ -31,7 +31,7 @@ IntelliCode is AI-assisted IntelliSense. It puts the most likely candidate at th
31
31
32
32
When writing C++, IntelliCode will assist when using popular libraries such as the C++ Standard Library. The context of your code is used to provide the most useful recommendations first. In the following example, the `size` member function is commonly used with the `sort` function, so it is surfaced to the top of the results list.
33
33
34
-

34
+

35
35
36
36
::: moniker range=">=msvc-160"
37
37
@@ -51,7 +51,7 @@ In Visual Studio 2017, IntelliCode is available as an extension in the Visual St
51
51
52
52
To override **Predictive IntelliSense** and show the longer list, press **Ctrl + J**. If **Predictive IntelliSense** is on, invoking **Ctrl + J** removes the Predictive filter. Pressing **Ctrl + J** again removes the accessibility filter from Member List results where relevant. The ([+]) button under the IntelliSense dropdown list does the same thing as **Ctrl + J**. Hover over the button to see tooltip information about what is being shown.
53
53
54
-

54
+

55
55
56
56
The preceding screenshot shows several buttons under the dropdown list. These enable IntelliSense Filters for different kinds of results:
57
57
@@ -68,21 +68,21 @@ A button is displayed only if it is relevant to your current IntelliSense sessio
68
68
69
69
When the caret is inside a template definition, a **Template Bar** appears, which enables you to provide sample template arguments for IntelliSense.
70
70
71
-

71
+

72
72
73
73
Click the **\<T>** icon to expand/collapse the **Template Bar**. Click the pencil icon or double-click the **Template Bar** to open the **Edit** window.
74
74
75
-

75
+

76
76
77
77
Edits that you make in the window are applied directly to the source code, so that you can see the effects in real time.
78
78
79
79
The Template Bar can auto-populate candidates based on instantiations in your code. Click on **Add All Existing Instantiations** to see a list of all concrete arguments that have been used to instantiate the template throughout your code base.
80
80
81
-

81
+

82
82
83
83
A window at the bottom of the editor shows where each instantiation was found, and what its arguments were.
84
84
85
-

85
+

86
86
87
87
**Template Bar** information is treated as user-specific. It is stored in the .vs folder and is not committed to source control.
88
88
@@ -104,7 +104,7 @@ The editor also offers Quick Fixes for some refactoring opportunities. For examp
104
104
105
105
Whenever you make a change to a file, a yellow bar appears on the left to indicate that unsaved changes were made. When you save the file, the bar turns green. The green and yellow bars are preserved as long as the document is open in the editor. They represent the changes that were made since you last opened the document.
106
106
107
-

107
+

108
108
109
109
## Move code
110
110
@@ -114,17 +114,17 @@ You can move lines of code up and down by selecting them, holding down Alt, and
114
114
115
115
A snippet is a predefined piece of source code. Right-click on a single point or on selected text to either insert a snippet or surround the selected text with the snippet. The following illustration shows the three steps to surround a selected statement with a for loop. The yellow highlights in the final image are editable fields that you access with the tab key. For more information, see [Code Snippets](/visualstudio/ide/code-snippets).
116
116
117
-

117
+

118
118
119
119
## Add Class
120
120
121
121
Add a new class from the **Project** menu, or from the context menu in **Solution Explorer**:
122
122
123
-

123
+

124
124
125
125
You can also use Class Wizard to modify or examine an existing class.
126
126
127
-

127
+

128
128
129
129
For more information, see [Adding Functionality with Code Wizards (C++)](../ide/adding-functionality-with-code-wizards-cpp.md).
130
130
@@ -155,7 +155,7 @@ You can also provide your own .clang-format or _clang-format file to apply custo
155
155
156
156
The files are easily shareable via source control, so you can enforce coding conventions across your whole development team.

159
159
160
160
Visual Studio 2017 and later also supports [EditorConfig](https://editorconfig.org/), which works in a similar way. ClangFormat, however, has more style options than EditorConfig, including rules that are specific to C++. With **EditorConfig**, you create **.editorconfig** files and place them in different folders of your codebase to specify code styles for those folders and their subfolders. An **.editorconfig** file supersedes any other **.editorconfig** files in parent folders and overwrites any formatting settings configured via **Tools** > **Options**. You can set rules for tabs vs. spaces, indent size, and more. For more information, see [Create portable, custom editor settings with EditorConfig](/visualstudio/ide/create-portable-custom-editor-options).
0 commit comments