• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

One File == One Class or what ??

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #11
    re

    yes that's right OrangeHopper.

    I thought about perhaps making a song and dance out the question but decided against this proposition due to the fact that it isn't warranted and would be unjustifiable.

    Comment


      #12
      One Class - > TWO FILES

      A header file for the class definition/documentation.

      A Source file for the implementation.

      When some other fecker wants to use the class, give him the header file and a library.

      Spod - In "Fcuking Amateurs" mode!

      Comment


        #13
        Mix and Match matie ....

        Since I use Java / C++ / Javascripy and C#
        I have found that it makes sense in terms of the size of .obj
        to have a C++ header and a C++ source.

        Now being that I love Microsoft Visual C++
        I have found some really wierd and wonderful
        circumstances where you need to move aspects of the
        body to the header if you go from vc6 to vc7.

        When using the document/view architecture of that
        particular compiler I often want view parameters
        at the start up of the view
        rather than in say onUpdate()
        So I often end up with more than one class per file pair.

        Clearly if you plan to create a re-usable DLL
        it makes no sense to put all the source in one or two files
        as upgrades become a right 'mare.

        Comment

        Working...
        X