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

and

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

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

Jonathan Leffler
  • 698,132
  • 130
  • 858
  • 1,229
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
  • 176
  • 6