Possible Duplicate:
Why are unnamed namespaces used and what are their benefits?
Looking at someones code and this is what they have declared:
namespace {
struct myStruct {
int x;
int y;
} obj1;
}
..in a function I see it used like this:
myStruct& var = obj1;
(Notice namespace
is anonymous.)
From how I see it used, I can not figure out why it is declared and used like this.
What does declaring it like this do differently?
Also, why is the pointer created like this rather than the traditional style shown here. i.e. myStruct *ptr;
Thank You!