typedef struct SPACESHIP{
var x;
} SPACESHIP;

It is totally correct. And I have test it and run normally.