質問編集履歴

1

メイン文とエラー文の修正

2016/01/21 01:58

投稿

saito.kaz
saito.kaz

スコア76

test CHANGED
File without changes
test CHANGED
@@ -6,19 +6,13 @@
6
6
 
7
7
  ###発生している問題・エラーメッセージ
8
8
 
9
- Main.cpp:20:20: warning: missing terminating '"' character [-Winvalid-pp-token]
9
+ ain.cpp:20:20: warning: missing terminating '"' character [-Winvalid-pp-token]
10
10
 
11
- strcpy(w2.name, "COPYNAME);
11
+ strcpy(w1.name, "COPYNAME);
12
12
 
13
13
  ^
14
14
 
15
15
  Main.cpp:20:20: error: expected expression
16
-
17
- Main.cpp:20:11: error: use of undeclared identifier 'w2'
18
-
19
- strcpy(w2.name, "COPYNAME);
20
-
21
- ^
22
16
 
23
17
  Main.cpp:32:2: error: expected '}'
24
18
 
@@ -32,7 +26,7 @@
32
26
 
33
27
  ^
34
28
 
35
- 1 warning and 3 errors generated.
29
+ 1 warning and 2 errors generated.
36
30
 
37
31
  ###ソースコード
38
32
 
@@ -96,7 +90,7 @@
96
90
 
97
91
  cout << "name = " << w1.name << "\n";
98
92
 
99
- strcpy(w2.name, "COPYNAME);
93
+ strcpy(w1.name, "COPYNAME);
100
94
 
101
95
  cout << "number = " << w1.number << "\n";
102
96
 
@@ -124,6 +118,8 @@
124
118
 
125
119
 
126
120
 
121
+
122
+
127
123
  ```
128
124
 
129
125