回答編集履歴

1

コメントをうけて修正

2017/05/01 12:06

投稿

hmmm
hmmm

スコア818

test CHANGED
@@ -58,17 +58,35 @@
58
58
 
59
59
 
60
60
 
61
+ class OtherClass{
62
+
63
+ public:
64
+
65
+ void ProcessData(const HogeData& data){
66
+
67
+ //何か処理
68
+
69
+ }
70
+
71
+ };
72
+
73
+
74
+
61
75
  int main(){
62
76
 
63
77
  Hoge hoge;
64
78
 
79
+ OtherClass other;
80
+
65
81
  hoge.SetCallback(
66
82
 
67
- [](const HogeData& data)
83
+ [&other](const HogeData& data)
68
84
 
69
85
  {
70
86
 
71
- //データを受け取って何かしら処理
87
+ //データを受け取って何かしら処理
88
+
89
+ other.ProcessData(data);
72
90
 
73
91
  }
74
92