質問編集履歴

4

コードの変更

2022/06/10 10:50

投稿

yuki_nam
yuki_nam

スコア28

test CHANGED
File without changes
test CHANGED
@@ -63,7 +63,7 @@
63
63
  }
64
64
 
65
65
  ```
66
- ### code runnerのsettings.json
66
+ ### settings.json
67
67
  ```
68
68
  {
69
69
  "latex-workshop.latex.recipes": [

3

settings.jsonの変更

2022/06/10 10:49

投稿

yuki_nam
yuki_nam

スコア28

test CHANGED
File without changes
test CHANGED
@@ -39,7 +39,7 @@
39
39
 
40
40
  ### c_cpp_properties.json
41
41
 
42
- ```c++
42
+ ```
43
43
  {
44
44
  "configurations": [
45
45
  {
@@ -63,6 +63,139 @@
63
63
  }
64
64
 
65
65
  ```
66
+ ### code runnerのsettings.json
67
+ ```
68
+ {
69
+ "latex-workshop.latex.recipes": [
70
+ {
71
+ "name": "make_ptex2pdf",
72
+ "tools": [
73
+ "ptex2pdf",
74
+ ]
75
+ }
76
+ ],
77
+ "latex-workshop.latex.tools": [
78
+ {
79
+ "name": "ptex2pdf",
80
+ "command": "ptex2pdf",
81
+ "args": [
82
+ "-interaction=nonstopmode",
83
+ "-l",
84
+ "-ot",
85
+ "-kanji=utf8 -synctex=1",
86
+ "%DOC%"
87
+ ]
88
+ }
89
+ ],
90
+ "latex-workshop.view.pdf.viewer": "tab",
91
+ "workbench.statusBar.visible": true,
92
+ "editor.renderControlCharacters": true,
93
+ "files.autoGuessEncoding": true,
94
+ "code-runner.runInTerminal": true,
95
+ "workbench.colorCustomizations": {
96
+
97
+ },
98
+ "terminal.integrated.enableMultiLinePasteWarning": false,
99
+ "remote.SSH.remotePlatform": {
100
+ "blue31.ced.cei.uec.ac.jp": "linux",
101
+ "sol": "linux"
102
+ },
103
+ "csharp.suppressDotnetInstallWarning": true,
104
+ "C_Cpp.default.cppStandard": "c++17",
105
+ "C_Cpp.default.cStandard": "c17",
106
+ "code-runner.clearPreviousOutput": true,
107
+ "code-runner.executorMapByGlob": {
108
+
109
+
110
+ "pom.xml": "cd $dir && mvn clean package"
111
+ },
112
+ "code-runner.executorMapByFileExtension": {
113
+
114
+ ".vb": "cd $dir && vbc /nologo $fileName && $dir$fileNameWithoutExt",
115
+ ".vbs": "cscript //Nologo",
116
+ ".scala": "scala",
117
+ ".jl": "julia",
118
+ ".cr": "crystal",
119
+ ".ml": "ocaml",
120
+ ".exs": "elixir",
121
+ ".hx": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
122
+ ".rkt": "racket",
123
+ ".scm": "csi -script",
124
+ ".ahk": "autohotkey",
125
+ ".au3": "autoit3",
126
+ ".kt": "cd $dir && kotlinc $fileName -include-runtime -d $fileNameWithoutExt.jar && java -jar $fileNameWithoutExt.jar",
127
+ ".kts": "kotlinc -script",
128
+ ".dart": "dart",
129
+ ".pas": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
130
+ ".pp": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
131
+ ".d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
132
+ ".hs": "runhaskell",
133
+ ".nim": "nim compile --verbosity:0 --hints:off --run",
134
+ ".csproj": "dotnet run --project",
135
+ ".fsproj": "dotnet run --project",
136
+ ".lisp": "sbcl --script",
137
+ ".kit": "kitc --run",
138
+ ".v": "v run",
139
+ ".vsh": "v run",
140
+ ".sass": "sass --style expanded",
141
+ ".cu": "cd $dir && nvcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
142
+ ".ring": "ring"
143
+ },
144
+ "code-runner.executorMap": {
145
+
146
+ "javascript": "node",
147
+ "java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
148
+ "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
149
+ "cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
150
+ "objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
151
+ "php": "php",
152
+ "python": "python -u",
153
+ "perl": "perl",
154
+ "perl6": "perl6",
155
+ "ruby": "ruby",
156
+ "go": "go run",
157
+ "lua": "lua",
158
+ "groovy": "groovy",
159
+ "powershell": "powershell -ExecutionPolicy ByPass -File",
160
+ "bat": "cmd /c",
161
+ "shellscript": "bash",
162
+ "fsharp": "fsi",
163
+ "csharp": "scriptcs",
164
+ "vbscript": "cscript //Nologo",
165
+ "typescript": "ts-node",
166
+ "coffeescript": "coffee",
167
+ "scala": "scala",
168
+ "swift": "swift",
169
+ "julia": "julia",
170
+ "crystal": "crystal",
171
+ "ocaml": "ocaml",
172
+ "r": "Rscript",
173
+ "applescript": "osascript",
174
+ "clojure": "lein exec",
175
+ "haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
176
+ "rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
177
+ "racket": "racket",
178
+ "scheme": "csi -script",
179
+ "ahk": "autohotkey",
180
+ "autoit": "autoit3",
181
+ "dart": "dart",
182
+ "pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
183
+ "d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
184
+ "haskell": "runhaskell",
185
+ "nim": "nim compile --verbosity:0 --hints:off --run",
186
+ "lisp": "sbcl --script",
187
+ "kit": "kitc --run",
188
+ "v": "v run",
189
+ "sass": "sass --style expanded",
190
+ "scss": "scss --style expanded",
191
+ "less": "cd $dir && lessc $fileName $fileNameWithoutExt.css",
192
+ "FortranFreeForm": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
193
+ "fortran-modern": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
194
+ "fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
195
+ "fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
196
+ },
197
+ }
198
+ ```
66
199
  ### 補足
67
200
 
68
201
  何か更に必要な情報がございましたらお教え下さると幸いです

2

バージョン確認のコードを変更した

2022/06/10 09:53

投稿

yuki_nam
yuki_nam

スコア28

test CHANGED
File without changes
test CHANGED
@@ -19,15 +19,9 @@
19
19
 
20
20
  int main(){
21
21
 
22
- //sample.cpp
22
+ long version = __cplusplus;
23
- //#include<iostream>
23
+ std::cout << "C++ Version : " << version << "\n";
24
24
 
25
-
26
- if (__cplusplus == 201703L) std::cout << "C++17\n";
27
- else if (__cplusplus == 201402L) std::cout << "C++14\n";
28
- else if (__cplusplus == 201103L) std::cout << "C++11\n";
29
- else if (__cplusplus == 199711L) std::cout << "C++98\n";
30
- else std::cout << "pre-standard C++\n";
31
25
 
32
26
 
33
27
 
@@ -36,9 +30,9 @@
36
30
  ```
37
31
  ### 結果
38
32
  ```
39
- C++14
33
+ C++ Version : 201402
40
34
  ```
41
-
35
+ 上は調べたところc++14を表していました。c++20である場合、202002と出るようです。
42
36
  ### 試したこと
43
37
  様々なサイトを調べて色々c_cpp_properties.jsonをいじったりしましたがエラーが出てしまったりしてしまいバージョン変更をすることができませんでした。
44
38
 

1

結果を追記した

2022/06/10 09:38

投稿

yuki_nam
yuki_nam

スコア28

test CHANGED
File without changes
test CHANGED
@@ -33,6 +33,10 @@
33
33
 
34
34
  return 0;
35
35
  }
36
+ ```
37
+ ### 結果
38
+ ```
39
+ C++14
36
40
  ```
37
41
 
38
42
  ### 試したこと