Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualL. Spiro

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

#1L. Spiro

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 you engine would crash and burn.

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


L. Spiro

PARTNERS