How to structure a game in OOP

Started by
19 comments, last by L. Spiro 10 years, 10 months ago

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

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

This topic is closed to new replies.

Advertisement