Jump to content

  • Log In with Google      Sign In   
  • Create Account


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: 13283

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.

It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

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