Bare in mind that myotherstruct is an alias for mystruct. In your source file, you're forward declaring both mystruct and myotherstruct, which is the same class. So it's equivalent to this:
you can't define myotherstruct again, because you previously typedefed it as mystruct! try tp #define it instread of typedefing it, and themm #undef it before the forward declaration!
The compiler correctly issues an error because you are trying to redefine the name myotherstruct.
At first you defined this name as
typedef mystruct myotherstruct;
That is now myotherstruct is a synonim for struct mystruct. Then you are trying to define a new type with the same name as myotherstruct
struct myotherstruct;
So the compiler does not know how to interpretate the name myotherstruct either as struct mystruct or as a new type struct myotherstruct.
The C++ Standard does not allow to use a typedef name with class names because otherwise there will be ambiguity. So if you need a forward declaration you should write