To answer the first part of your question, when something appears between the closing
}
and
;
of a class/struct/union definition, it creates an instance of that class/struct/union with the specified name. It's the equivalent of
struct Class2 {...};
Class2 ob1;
for those who are obsessed with typing fewer characters.