求助!!结构体指针赋值!十分感谢
求助!!!#include <stdio.h>
#include <stdlib.h>
typedef struct
{
int row;
double *vec;
} VEC;
void mat_mul(VEC,VEC,double);
void result(VEC);
int main(void)
{
double aa=3.1;
VEC v1,v2;
v1.row=3;
v2.row=3;
v1.vec=v2.vec=NULL;
v1.vec=(double*)calloc(v1.row,sizeof(double));
v2.vec=(double*)calloc(v2.row,sizeof(double));
v1.vec[3]={3,2,7};
v2.vec[3]={4.2,5,6.7};
mat_mul(v1,v2,aa);
result(v2);
return 0;
}
为什么(红色标记处)总会出现 error: expected expression before '{' token
的错误提示??怎么解决