Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 276b28b

Browse files
Set up code for 4th tutorial.
1 parent 9bfe372 commit 276b28b

File tree

5 files changed

+58
-0
lines changed

5 files changed

+58
-0
lines changed

‎.vscode/settings.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"files.associations": {
3+
"iostream": "cpp"
4+
}
5+
}

‎.vscode/tasks.json‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"tasks": [
3+
{
4+
"type": "cppbuild",
5+
"label": "C/C++: clang++ build active file",
6+
"command": "/usr/bin/clang++",
7+
"args": [
8+
"-fcolor-diagnostics",
9+
"-fansi-escape-codes",
10+
// "-g",
11+
"${file}",
12+
"-o",
13+
"${fileDirname}/${fileBasenameNoExtension}",
14+
"-std=c++11",
15+
"-Wall",
16+
"-Werror",
17+
"&&",
18+
"./main"
19+
],
20+
"options": {
21+
"cwd": "${fileDirname}"
22+
},
23+
"problemMatcher": ["$gcc"],
24+
"group": {
25+
"kind": "build",
26+
"isDefault": true
27+
},
28+
"detail": "Task generated by Debugger."
29+
}
30+
],
31+
"version": "2.0.0"
32+
}

‎004-vscode-build-run/main‎

18.6 KB
Binary file not shown.

‎004-vscode-build-run/main.cpp‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <iostream>
2+
3+
int main() {
4+
// int x = "abc";
5+
6+
int a = 101;
7+
std::cout << "a -> " << a << std::endl;
8+
9+
int b{10};
10+
std::cout << "b -> " << b << std::endl;
11+
12+
double d = 25.5;
13+
std::cout << "d -> " << d << std::endl;
14+
15+
return 0;
16+
}

‎004-vscode-build-run/makefile‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
main: main.cpp
2+
clang++ -std=c++11 main.cpp -o main
3+
4+
clean:
5+
rm -rf main main.dSYM

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /