I have seen code like this in some places:
Code:
typedef struct _mystruct {
    int x;
    int y;
} mystruct;
But, in my C++ class at school, the teacher told us to do it like this (no typedef):
Code:
struct mystruct {
    int x;
    int y;
};
Why would you do the first one if the second one works?