[Box Backup] Coding standards

Martin Ebourne boxbackup@fluffy.co.uk
Wed, 31 Aug 2005 11:24:30 +0100


Ben Summers <ben@fluffy.co.uk> wrote:
> So, are they OK?

Looks ok to me, just a couple of points below.

> Non-member function calls are prefixed with ::, eg ::printf(...).

The scoping operator should be used where correct and appropriate.

eg.
printf is in <cstdio> and is part of the std namespace, so it should be 
std::printf.
execve is in <unistd.h> and is not in a namespace, so it should be ::execve.

I think it is often useful to put 'using namespace std;' in .cpp files 
(but never in .h files), to make the code more readable.

> Use the STL wherever useful, but don't use the STL style!

How do you define 'STL style'?

Cheers,

Martin.