回答編集履歴
1
文言
answer
CHANGED
@@ -1,1 +1,9 @@
|
|
1
|
-
エラーメッセージが難解ですが、「`std::vector<...>::const_iterator` を `std::vector<...>::iterator` に代入できません」と言っています。`enemy` が `const std::vector<...>` か `const std::vector<...>&` なのでしょう。
|
1
|
+
エラーメッセージが難解ですが、「`std::vector<...>::const_iterator` を `std::vector<...>::iterator` に代入できません」と言っています。`enemy` が `const std::vector<...>` か `const std::vector<...>&` なのでしょう。
|
2
|
+
|
3
|
+
特別な事情がない限り、range based for を使ってください。
|
4
|
+
```c++
|
5
|
+
for (auto& ptr : enemy)
|
6
|
+
{
|
7
|
+
// ptr->Update();
|
8
|
+
}
|
9
|
+
```
|