Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualjapro

Posted 20 January 2012 - 04:51 PM

Also how would that even look like? You have a private member and then a public const pointer you initialize in the constructor?

Edit: got ninjad on that one. To at least add to the topic. One of the big reasons you hide stuff behind getters/setters is also that you can change the internal structure without affecting the interface. Maybe at a later point your int data member gets moved down to a internal substructure or is packed into something else or changes it's type.

#1japro

Posted 20 January 2012 - 04:48 PM

Also how would that even look like? You have a private member and then a public const pointer you initialize in the constructor?

PARTNERS