I\'ve just started learning C with a professional Java background and some (if no too much) C++ knowledge, and I was astonished that this doesn\'t work in C:
str
Structs are not types. You can create a point from a struct as follows:
struct Point p;
p.x = 0;
p.y = 0;
If you want to use a struct as a type, you have to typedef it. This works in both C and C++:
typedef struct _point {
int x;
int y;
} Point;
Always give your struct a name though, if you have to forward declare it to be able to have pointers to a struct of the same type or circular dependencies.