When compiling the following code :
struct Point {
int x;
int y;
};
struct Position {
int x;
int y;
};
struct Point p = {1, 2};
struct Position q = (struct Position)p;
An error occurs :
error: used type 'struct Position' where arithmetic or pointer type is required
Isn't there some way to cast between different struct
instances when those struct
actually have the same definition ?