Skip to content

Commit 39ab866

Browse files
authored
Merge pull request #3595 from microsoft/seanmcm/0_23_0_release
Seanmcm/0 23 0 release
2 parents c18592b + d4cdfe6 commit 39ab866

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+9262
-2532
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ignore cache files for sample projects
2+
.vscode/ipch
3+
browse*.db*
4+
*.obj
5+
*.pdb
6+
*.exe
7+
*.ilk
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#ifndef BOX_H
2+
#define BOX_H
3+
4+
/**
5+
* Definition of a box object with three dimensions.
6+
*/
7+
struct box
8+
{
9+
int length;
10+
int width;
11+
int height;
12+
13+
int volume()
14+
{
15+
return length * width * height;
16+
}
17+
};
18+
19+
#endif
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Box Sample
2+
This sample is a simple C++ program that computes and outputs the volume of a box.
3+
4+
We use this example in our blog posts to illustrate new extension features.
5+
6+
## Build and Debug Active File
7+
Available as of March 2019, "Build and Debug Active File" automatically configures the build tasks and kicks off a build and debug session. There are
8+
three ways to get started with this feature.
9+
10+
### Command
11+
While editing a file in your workspace folder, you can open the command palette and select the `C/C++: Build and Debug Active File` command.
12+
This option will generate a tasks.json file for you, build your active source file, and then launch the debugger.
13+
14+
![Open command palette and select Build and Debug Active File](build_debug_command.png)
15+
16+
### Context Menu
17+
While editing a file in a workspace folder, you can right click in the editor field and select the "Build and Debug Active File" context menu option.
18+
This option will generate a tasks.json file for you, build your active source file, and then launch the debugger.
19+
20+
![Right click and select Build and Debug Active File](build_debug_context_menu.png)
21+
22+
### F5
23+
Another way to begin building and debugging your active file is to execute the command by pressing <kbd>F5</kbd>. This method will configure
24+
both a tasks.json and launch.json file for you, build your active source file, and then launch the debugger.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <iostream>
2+
#include "Objects/box.h"
3+
4+
using namespace std;
5+
6+
/**
7+
* Calculate and print the volume of a box.
8+
*/
9+
int main()
10+
{
11+
box package{ 10, 10, 10 };
12+
cout << "Package length: " << package.length << endl;
13+
cout << "Package width: " << package.width << endl;
14+
cout << "Package height: " << package.height << endl;
15+
cout << "Package volume: " << package.volume() << endl;
16+
}
25.9 KB
Loading
33.1 KB
Loading

Code Samples/SampleClangProject/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

Code Samples/SampleClangProject/.vscode/launch.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

Code Samples/SampleClangProject/.vscode/tasks.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

Code Samples/SampleClangProject/README.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)