質問編集履歴

2

push_backの部分を追加しました。

2019/08/06 14:59

投稿

motimotio
motimotio

スコア14

test CHANGED
File without changes
test CHANGED
@@ -44,7 +44,15 @@
44
44
 
45
45
  Aggrecate(){};
46
46
 
47
- Aggrecate(const std::shared_ptr<Hoge>& _hoges) : hoges(_hoges){};
47
+ Aggrecate(const std::shared_ptr<Hoge> _hoges) : hoges(_hoges){};
48
+
49
+
50
+
51
+ void add(const std::shared_ptr<Hoge>& s) {
52
+
53
+ hoges.push_back(s);
54
+
55
+ }
48
56
 
49
57
  };
50
58
 
@@ -60,6 +68,8 @@
60
68
 
61
69
  }
62
70
 
71
+
72
+
63
73
  ```
64
74
 
65
75
 

1

該当する部分を修正しました。

2019/08/06 14:59

投稿

motimotio
motimotio

スコア14

test CHANGED
File without changes
test CHANGED
@@ -44,7 +44,7 @@
44
44
 
45
45
  Aggrecate(){};
46
46
 
47
- Aggrecate(std::shared_ptr<Hoge>& _hoges) : hoges(_hoges){};
47
+ Aggrecate(const std::shared_ptr<Hoge>& _hoges) : hoges(_hoges){};
48
48
 
49
49
  };
50
50