Practical C Programming, 3rd Edition

I l @ ve RuBoard

  • A single block of code enclosed in { } should not span more than a couple of pages. Split up any bigger blocks into several smaller, simpler procedures.

  • When your code starts to run into the right margin, it's time to split the procedure into several smaller, simpler procedures.

  • Always define a constructor, destructor, and copy constructor for a class. If using the C++ defaults, "define" these routines with a comment such as:

    class example { public: // Example -- default constructor

I l @ ve RuBoard

Категории