Don't forget that you need a ; at the end of your class defn -
class class_name {
// ...
};
In C when you created a struct and didn't define it with a typedef you'd have to say:
struct struct_name struct_instance_name;
rather than what you'd be used to. However that need is now gone in C++ so you can just do a:
struct_name struct_instance_name;
and it'll be happy out. Now. In the code you posted there the structure is typedef-ed ... In C this would be fine with either of these methods
typedef str {
// add stuff here
} my_struct;
// ...
my_struct my_inst; // <- OK
struct str my_inst_2; // <- OK
str my_inst_3;// <- illegal
so the typedef omits the necessity for a structure identifier in C, but it's no necessary in structures in C++ nor with classes so you can ignore those last two lines.