You need to do it in an initializer list:
Bar(Foo* _foo) : foo(_foo) {
}
(Note that I renamed the incoming variable to avoid confusion.)
You need to do it in an initializer list:
Bar(Foo* _foo) : foo(_foo) {
}
(Note that I renamed the incoming variable to avoid confusion.)