Skip to content

Commit 6103cac

Browse files
authored
Merge pull request #8439 from microsoft/cpp-screenshots
Update screenshots and indentation
2 parents 19ebdeb + 44aaf1a commit 6103cac

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

docs/languages/cpp.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ C/C++ support for Visual Studio Code is provided by a [Microsoft C/C++ extension
1313
## Install the extension
1414

1515
1. Open VS Code.
16-
1. Select the Extensions view icon on the Activity bar or use the keyboard shortcut (`kb(workbench.view.extensions)`).
16+
1. Select the Extensions view icon on the Activity Bar or use the keyboard shortcut (`kb(workbench.view.extensions)`).
1717
1. Search for `'C++'`.
1818
1. Select **Install**.
1919

@@ -91,21 +91,21 @@ To understand the process, let's install Mingw-w64 via [MSYS2](https://www.msys2
9191
1. Enter `Y` when prompted whether to proceed with the installation.
9292

9393
1. Add the path of your MinGW-w64 `bin` folder to the Windows `PATH` environment variable by using the following steps:
94-
1. In the Windows search bar, type **Settings** to open your Windows Settings.
95-
1. Search for **Edit environment variables for your account**.
96-
1. In your **User variables**, select the `Path` variable and then select **Edit**.
97-
1. Select **New** and add the MinGW-w64 destination folder you recorded during the installation process to the list. If you selected the default installation steps, the path is: `C:\msys64\ucrt64\bin`.
98-
1. Select **OK**, and then select **OK** again in the **Environment Variables** window to update the `PATH` environment variable.
99-
You have to reopen any console windows for the updated `PATH` environment variable to be available.
94+
1. In the Windows search bar, type **Settings** to open your Windows Settings.
95+
1. Search for **Edit environment variables for your account**.
96+
1. In your **User variables**, select the `Path` variable and then select **Edit**.
97+
1. Select **New** and add the MinGW-w64 destination folder you recorded during the installation process to the list. If you selected the default installation steps, the path is: `C:\msys64\ucrt64\bin`.
98+
1. Select **OK**, and then select **OK** again in the **Environment Variables** window to update the `PATH` environment variable.
99+
You have to reopen any console windows for the updated `PATH` environment variable to be available.
100100
1. Check that your MinGW-w64 tools are correctly installed and available, open a **new** Command Prompt and type:
101101

102-
```bash
103-
gcc --version
104-
g++ --version
105-
gdb --version
106-
```
102+
```bash
103+
gcc --version
104+
g++ --version
105+
gdb --version
106+
```
107107

108-
You should see output that states which versions of GCC, g++ and GDB you have installed. If this is not the case, make sure your PATH entry matches the Mingw-w64 binary location where the compiler tools are located or reference the [troubleshooting section](/docs/cpp/config-mingw.md#_check-your-mingw-installation).
108+
You should see output that states which versions of GCC, g++ and GDB you have installed. If this is not the case, make sure your PATH entry matches the Mingw-w64 binary location where the compiler tools are located or reference the [troubleshooting section](/docs/cpp/config-mingw.md#_check-your-mingw-installation).
109109

110110
## Create a Hello World App
111111

@@ -116,19 +116,19 @@ To make sure the compiler is installed and configured correctly, lets create a H
116116
1. On Windows, launch a Windows command prompt (Enter **Windows command prompt** in the Windows search bar). On macOS and Linux, you can enter these commands in the terminal.
117117
1. Run the following commands. They are creating an empty folder called `projects` where you can place all your VS Code projects. The next commands create and navigate you to a subfolder called `helloworld`. From there, you are opening `helloworld` directly in VS Code using the `code` command.
118118

119-
```bat
120-
mkdir projects
121-
cd projects
122-
mkdir helloworld
123-
cd helloworld
124-
code .
125-
```
119+
```bat
120+
mkdir projects
121+
cd projects
122+
mkdir helloworld
123+
cd helloworld
124+
code .
125+
```
126126

127-
The "code ." command opens VS Code in the current working folder, which becomes your "workspace". Accept the [Workspace Trust](/docs/editing/workspaces/workspace-trust.md) dialog by selecting **Yes, I trust the authors** since this is a folder you created.
127+
The "code ." command opens VS Code in the current working folder, which becomes your "workspace". Accept the [Workspace Trust](/docs/editing/workspaces/workspace-trust.md) dialog by selecting **Yes, I trust the authors** since this is a folder you created.
128128

129-
Now create a new file called `helloworld.cpp` with the **New File** button in the File Explorer or **File** > **New File** command.
129+
1. Now, create a new file called `helloworld.cpp` with the **New File** button in the File Explorer or **File** > **New File** command.
130130

131-
![File Explorer New File button](images/cpp/new-file.png)
131+
![File Explorer New File button](images/cpp/new-file.png)
132132

133133
### Add Hello World source code
134134

@@ -143,7 +143,7 @@ int main()
143143
}
144144
```
145145
146-
Now press `kb(workbench.action.files.save)` to save the file. You can also enable [AutoSave](/docs/editing/codebasics.md#save-auto-save) to automatically save your file changes, by checking **Auto Save** in the main **File** menu.
146+
Now press `kb(workbench.action.files.save)` to save the file. You can also enable [AutoSave](/docs/editing/codebasics.md#save--auto-save) to automatically save your file changes, by checking **Auto Save** in the main **File** menu.
147147
148148
## Run helloworld.cpp
149149
@@ -156,7 +156,7 @@ Now press `kb(workbench.action.files.save)` to save the file. You can also enabl
156156
157157
![C++ debug configuration dropdown](images/cpp/select-gcc-compiler.png)
158158
159-
You are only prompted to choose a compiler the first time you run `helloworld.cpp`. This compiler becomes "default" compiler set in your `tasks.json` file.
159+
You are only prompted to choose a compiler the first time you run `helloworld.cpp`. This compiler becomes "default" compiler set in your `tasks.json` file.
160160
161161
4. After the build succeeds, you should see "Hello World" appear in the integrated **Terminal**.
162162
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)