質問編集履歴

2

エラーの提示

2021/01/21 06:35

投稿

rinrin200011
rinrin200011

スコア8

test CHANGED
File without changes
test CHANGED
@@ -87,3 +87,81 @@
87
87
  }
88
88
 
89
89
  ```
90
+
91
+
92
+
93
+ エラーの内容としては
94
+
95
+ Main.c:6:10: warning: incompatible pointer to integer conversion initializing 'char' with an expression of type 'char [4]' [-Wint-conversion]
96
+
97
+ char yes_judge = "yes", select;
98
+
99
+ ^ ~~~~~
100
+
101
+ Main.c:14:20: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat]
102
+
103
+ scanf("%s",select);
104
+
105
+ ~~ ^~~~~~
106
+
107
+ Main.c:16:24: error: subscripted value is not an array, pointer, or vector
108
+
109
+ while(yes_judge[i]!='\0' && select[i]!='\0'){
110
+
111
+ ~~~~~~~~~^~
112
+
113
+ Main.c:16:43: error: subscripted value is not an array, pointer, or vector
114
+
115
+ while(yes_judge[i]!='\0' && select[i]!='\0'){
116
+
117
+ ~~~~~~^~
118
+
119
+ Main.c:17:25: error: subscripted value is not an array, pointer, or vector
120
+
121
+ if(yes_judge[i]!=select[i]){
122
+
123
+ ~~~~~~~~~^~
124
+
125
+ Main.c:17:36: error: subscripted value is not an array, pointer, or vector
126
+
127
+ if(yes_judge[i]!=select[i]){
128
+
129
+ ~~~~~~^~
130
+
131
+ Main.c:31:17: error: use of undeclared identifier 'str_days'
132
+
133
+ sprintf(str_days, "%d", days);
134
+
135
+ ^
136
+
137
+ Main.c:33:55: warning: treating Unicode character as whitespace [-Wunicode-whitespace]
138
+
139
+ printf("よくやった。あなたは今、"+ str_days +"日継続中だ!");
140
+
141
+ ^~
142
+
143
+ Main.c:33:66: warning: treating Unicode character as whitespace [-Wunicode-whitespace]
144
+
145
+ printf("よくやった。あなたは今、"+ str_days +"日継続中だ!");
146
+
147
+ ^~
148
+
149
+ Main.c:33:58: error: use of undeclared identifier 'str_days'
150
+
151
+ printf("よくやった。あなたは今、"+ str_days +"日継続中だ!");
152
+
153
+ ^
154
+
155
+ Main.c:41:2: error: expected '}'
156
+
157
+ }
158
+
159
+ ^
160
+
161
+ Main.c:3:16: note: to match this '{'
162
+
163
+ int main(void) {
164
+
165
+ ^
166
+
167
+ 4 warnings and 7 errors generated.

1

誤字

2021/01/21 06:35

投稿

rinrin200011
rinrin200011

スコア8

test CHANGED
File without changes
test CHANGED
@@ -58,7 +58,7 @@
58
58
 
59
59
  days = days + 1;
60
60
 
61
- hot_meter = hot_meter + 10;
61
+
62
62
 
63
63
 
64
64