質問編集履歴

4

誤字

2021/05/20 04:45

投稿

tendon_udon
tendon_udon

スコア0

test CHANGED
@@ -1 +1 @@
1
- 初学者 構造体の配列を関数の引数に渡す方法が知りたい
1
+ 初学者 構造体の配列を関数の引数に渡す方法が知りたい
test CHANGED
File without changes

3

ソースコードの修正

2021/05/20 04:45

投稿

tendon_udon
tendon_udon

スコア0

test CHANGED
@@ -1 +1 @@
1
- 初学者 構造体の配列を関数の引数に渡す方法が知りたい
1
+ 初学者 構造体の配列を関数の引数に渡す方法が知りたい
test CHANGED
@@ -63,6 +63,8 @@
63
63
 
64
64
 
65
65
  c++
66
+
67
+ ```
66
68
 
67
69
  #include <bits/stdc++.h>
68
70
 

2

修正

2021/05/20 03:12

投稿

tendon_udon
tendon_udon

スコア0

test CHANGED
File without changes
test CHANGED
@@ -14,14 +14,6 @@
14
14
 
15
15
  ### 発生している問題・エラーメッセージ
16
16
 
17
- ques.cpp:15:2: error: expected ‘;’ after struct definition
18
-
19
- 15 | }
20
-
21
- | ^
22
-
23
- | ;
24
-
25
17
  ques.cpp: In function ‘void draw(board*)’:
26
18
 
27
19
  ques.cpp:18:8: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
@@ -36,9 +28,27 @@
36
28
 
37
29
  | std::ostream {aka std::basic_ostream<char>}
38
30
 
31
+ In file included from /usr/include/c++/9/string:56,
39
32
 
33
+ from /usr/include/c++/9/bits/locale_classes.h:40,
40
34
 
35
+ from /usr/include/c++/9/bits/ios_base.h:41,
36
+
37
+ from /usr/include/c++/9/ios:42,
38
+
39
+ from /usr/include/c++/9/istream:38,
40
+
41
+ from /usr/include/c++/9/sstream:38,
42
+
43
+ from /usr/include/c++/9/complex:45,
44
+
45
+ from /usr/include/c++/9/ccomplex:39,
46
+
47
+ from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
48
+
41
- ......
49
+ from ques.cpp:1:
50
+
51
+ /usr/include/c++/9/bits/basic_string.tcc:1466:5: n
42
52
 
43
53
 
44
54
 
@@ -80,19 +90,13 @@
80
90
 
81
91
  string maru;
82
92
 
83
- }
93
+ };
84
94
 
85
95
  void draw(board ichi[])
86
96
 
87
97
  {
88
98
 
89
- cout>>ichi[0].maru>>" " >>ichi[3].maru>>" ">>ichi[7].maru>>endl;
99
+ cout>>ichi[0].maru>>endl;}
90
-
91
- cout>>ichi[1].maru>>" " >>ichi[4].maru>>" ">>ichi[8].maru>>endl;
92
-
93
- cout>>ichi[2].maru>>" " >>ichi[5].maru>>" ">>ichi[9].maru>>endl;
94
-
95
- }
96
100
 
97
101
 
98
102
 

1

エラーを追記

2021/05/20 02:36

投稿

tendon_udon
tendon_udon

スコア0

test CHANGED
File without changes
test CHANGED
@@ -14,13 +14,37 @@
14
14
 
15
15
  ### 発生している問題・エラーメッセージ
16
16
 
17
+ ques.cpp:15:2: error: expected ‘;’ after struct definition
18
+
19
+ 15 | }
20
+
21
+ | ^
22
+
23
+ | ;
24
+
25
+ ques.cpp: In function ‘void draw(board*)’:
26
+
27
+ ques.cpp:18:8: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
28
+
29
+ 18 | cout>>ichi[0].maru>>endl;
30
+
31
+ | ~~~~^~~~~~~~~~~~~~
32
+
33
+ | | |
34
+
35
+ | | std::string {aka std::__cxx11::basic_string<char>}
36
+
37
+ | std::ostream {aka std::basic_ostream<char>}
17
38
 
18
39
 
19
- ```
20
40
 
21
- エラーメッセージ
41
+ ......
22
42
 
23
- ```
43
+
44
+
45
+
46
+
47
+
24
48
 
25
49
 
26
50
 
@@ -114,16 +138,6 @@
114
138
 
115
139
 
116
140
 
117
- ### 試したこと
141
+ #補足
118
142
 
119
-
120
-
121
- ここに問題に対して試したことを記載してください。
122
-
123
-
124
-
125
- ### 補足情報(FW/ツバージョンなど)
143
+ コンパイルエラはまだ続いているですが、膨大すぎるのでpick upしてのせました
126
-
127
-
128
-
129
- ここにより詳細な情報を記載してください。