Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


How to structure a game in OOP


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
20 replies to this topic

#21 L. Spiro   Crossbones+   -  Reputation: 20764

Like
2Likes
Like

Posted 07 June 2013 - 03:25 PM

Tispe, on 07 Jun 2013 - 20:04, said:


L. Spiro, on 07 Jun 2013 - 09:37, said:
Whenever you need to pass a ton of parameters it is better to make a structure with those parameters as its members and pass a reference to that structure.



L. Spiro


Why not pass by address, that way you can pass a NULL?

NULL is not a valid parameter or your engine would crash and burn.

Always use references when NULL is invalid. Use pointers only when NULL is a valid parameter.


L. Spiro

Edited by L. Spiro, 07 June 2013 - 03:25 PM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS