given a struct in the form ( declared before the main()
or after )
struct
{
...
} bar;
I don't know how to manage this and how to treat this kind of object.
In general I would like a 360° answer about this but I also have few questions:
- is this equivalent to declaring a
static
struct ? - it's legal and safe in C++11 ?
- how to access bar by reference ?
For the last one I have prepared a small snippet here, that doesn't works but shows what I'm trying to achieve.