-1
Class::Class() {
    this->func();
}

and

Class::Class() {
    func();
}

Are there any differences between these two ways of calling a function?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Leeleo3x
  • 631
  • 1
  • 6
  • 13

1 Answers1

0

Yes, this->var ensures you're working with instance variable - which may be useful when your instance variables may be shadowed inside a block.

Djordje
  • 186
  • 7