回答編集履歴

1

文言

2021/06/03 05:17

投稿

int32_t
int32_t

スコア20923

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