Skip to content

Commit 316ab79

Browse files
setup c++
1 parent 263b6dc commit 316ab79

File tree

20 files changed

+910
-63
lines changed

20 files changed

+910
-63
lines changed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
._.DS_Store
77
**/.DS_Store
88
**/._.DS_Store
9-
.vscode
9+
**.dSYM
10+
**.bin
11+
# .vscode
1012
*.class
13+
.**
1114
testCPP/*
1215
Coding-ninjas-competitive
1316
Competitive-Coding
@@ -24,4 +27,4 @@ leetcode/array/.cph/
2427
hello.dSYM/Contents/Info.plist
2528
hackerRank-java/hackerRank-jav a.iml
2629
leetcode/array/save.bin
27-
.cph
30+
**.out

.vscode/c_cpp_properties.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Mac",
5+
"includePath": [
6+
"${workspaceFolder}/**"
7+
],
8+
"defines": [],
9+
"macFrameworkPath": [
10+
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
11+
],
12+
"compilerPath": "/usr/bin/clang++",
13+
"cStandard": "c17",
14+
"cppStandard": "c++20",
15+
"intelliSenseMode": "macos-clang-x64"
16+
}
17+
],
18+
"version": 4
19+
}

.vscode/launch.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "C++ - Debug Single File",
6+
"type": "lldb",
7+
"request": "launch",
8+
"program": "${fileDirname}/a.out",
9+
"args": [],
10+
"stopAtEntry": false,
11+
"cwd": "${workspaceFolder}",
12+
"environment": [],
13+
"externalConsole": false,
14+
"MIMode": "lldb",
15+
"preLaunchTask": "C++ - Debug Single File"
16+
},
17+
{
18+
"name": "C++ - Debug Multi File",
19+
"type": "lldb",
20+
"request": "launch",
21+
"program": "${fileDirname}/a.out",
22+
"args": [],
23+
"stopAtEntry": false,
24+
"cwd": "${workspaceFolder}",
25+
"environment": [],
26+
"externalConsole": false,
27+
"MIMode": "lldb",
28+
"preLaunchTask": "C++ - Debug Multi File"
29+
}
30+
]
31+
}

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"files.associations": {
3+
"vector": "cpp"
4+
},
5+
"cph.general.defaultLanguage": "cpp",
6+
"cph.language.cpp.Command": "g++",
7+
"C_Cpp.errorSquiggles": "disabled"
8+
}

.vscode/tasks.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"tasks": [
3+
{
4+
"type": "shell",
5+
"label": "C++ - Debug Single File",
6+
"command": "/usr/bin/clang++",
7+
"args": [
8+
"-std=c++20",
9+
"-stdlib=libc++",
10+
"-g",
11+
"-Wall",
12+
"${file}",
13+
"-o",
14+
"${fileDirname}/a.out"
15+
],
16+
"options": {
17+
"cwd": "${workspaceFolder}"
18+
},
19+
"problemMatcher": [
20+
"$gcc"
21+
],
22+
"group": "build"
23+
},
24+
{
25+
"type": "shell",
26+
"label": "C++ - Debug Multi File",
27+
"command": "/usr/bin/clang++",
28+
"args": [
29+
"-std=c++20",
30+
"-stdlib=libc++",
31+
"-g",
32+
"-Wall",
33+
"*.cpp",
34+
"-o",
35+
"${fileDirname}/a.out"
36+
],
37+
"options": {
38+
"cwd": "${workspaceFolder}"
39+
},
40+
"problemMatcher": [
41+
"$gcc"
42+
],
43+
"group": "build"
44+
},
45+
{
46+
"type": "cppbuild",
47+
"label": "C/C++: clang++ build active file",
48+
"command": "/usr/bin/clang++",
49+
"args": [
50+
"-fcolor-diagnostics",
51+
"-fansi-escape-codes",
52+
"-g",
53+
"${file}",
54+
"-o",
55+
"${fileDirname}/${fileBasenameNoExtension}"
56+
],
57+
"options": {
58+
"cwd": "${fileDirname}"
59+
},
60+
"problemMatcher": [
61+
"$gcc"
62+
],
63+
"group": {
64+
"kind": "build",
65+
"isDefault": true
66+
},
67+
"detail": "Task generated by Debugger."
68+
}
69+
],
70+
"version": "2.0.0"
71+
}

0 commit comments

Comments
 (0)