Jump to content

Seperate files for one program

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Phoenixz

Phoenixz

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 256 posts
When? When do you need to use seperate files for one program? I've seen it in many different programs, and i'm not talking header files, i'm talking source files. Any ideas when it is appropriate? I don't understand why it'd ever be needed. oO
Posted Image

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
I was with you a while back. What happens is you will build a piece of standard functionality and you start using it in every project. You then start having to copy/paste it all over the place. So far, not a huge deal.

Then one day you find a bug in your code. Now you have to find EVERY program that has that buggy code and fix it! With separate files, you just recompile everything after making the fix in one place.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
I find it easier to let individual files represent individual objects. It makes organization (and thus debugging) a lot easier when dealing with large projects.

#4
Phoenixz

Phoenixz

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 256 posts
Thank you both very much :}
Posted Image