#include
#include
#include
#include
#include
typedef struct
{
double x;
double y;
} vec;
typedef struct
{
vec p0;
vec p1;
vec dir;
} seg;
int main()
{
vec p0={0,1};
vec p1={1,2};
vec dir={1,3};
seg a={p0,p1,dir};
return 0;
}
提示错误:
d:\cpractice\test\test\test.c(26): error C2440: “初始化”: 无法从“vec”转换为“double”