[Box Backup] Coding standards

Martin Ebourne boxbackup at fluffy.co.uk
Wed Aug 31 11:24:30 BST 2005


Ben Summers <ben at 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.



More information about the Boxbackup mailing list