I am used to putting header guards around my objects like:
#ifndef SOMETHING_H
#define SOMETHING_H
class Something {
...
}
#endif
but I have been given code where they also do:
#ifndef SOMETHING_H
#include "something.h"
#endif
for every include. Supposedly, this is better. Why? Is this redundant with guards around the object?
This is discussed in pretty good detail here:
http://c2.com/cgi/wiki?RedundantIncludeGuards
Here are the highlights: