Skip to main content
gamedev.net
🔒 Locked

Multiple objects

Started by s3202 1 reply 250+ views
Original Post
s3202
s3202
I have two source files that need access to a single object. Would it be best to create the object in one source file and pass it as a pointer to another source file. Or, would it be better to make the memebers of the class static and create seperate instances of the object in each source file? ---- "Caw, caw, BANG f**k I''m dead!" --The Crow
----Herb M. (s3202)
sjelkjd
sjelkjd
You might want to check out the singleton design pattern(it''s on gamedev.net this month)
s3202
s3202
Thank you! That''s exactly what I needed.

----
"Caw, caw, BANG f**k I''m dead!" --The Crow
----Herb M. (s3202)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.