Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Tron3k

Reusable files

This topic is 5858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When you have cpp and h files that you use a lot, do you just copy them to each project when you need to use them, or do you do like: #include "c:\tron\modules\clog.h" (ie. you have a folder where you put all of them and include it directly from there). The problem with the second method is if you change it drastically it won''t work anymore, but the problem with the first method is if you add something useful, you have to recopy it to the project folder. What do you guys do? Firebird Entertainment

Share this post


Link to post
Share on other sites
Advertisement
The include way. If you change something for the better, the old project(s) will benefit from the changes as well.

Share this post


Link to post
Share on other sites
quote:
Original post by elis-cool
I copy, its no big deal

The problem comes when you have two projects that are using the same shared file. If you modify it and forget to copy the file back, you might modify the other one next and you'll be in a big mess. Besides, why copy files around if you can reference the same file?
quote:

also some stuff may vary slightly from project to project...


If you have to 'slightly' change common files to suit different projects, then they are not really common. They have have project-dependent specifics that prevent them from being truly common. They are more like 'parts of a specific project that can be used in other projects with certain modifications' than 'common files that can be used in any project (within reasonable constraints, of course) for whatever they are doing'.

[edited by - IndirectX on June 8, 2002 10:21:11 PM]

Share this post


Link to post
Share on other sites
Create an own folder within your Visual C++ include folder and off you go..

just my 2 cents,
cya,
Phil


Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states )

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Actually, I have a local SourceSafe server set up and I share the header across projects in SourceSafe.

Source control is your friend.

Share this post


Link to post
Share on other sites
if you use stuff alot, like initialization code for DirectX or OGL, just make a library, then make calls to it, alot simpler, and i think it''s alot cleaner. Just my 2.49183 Japanese Yen ( two cents for you who are too lazy to go see what it equals

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!