<分区>
刚开始了解结构,尤其是涉及访问结构成员的地址或值。
我不确定我在这里使用的语言,但我有:
- 结构a的2x2矩阵
- struct x 是一个大小为 2 的数组
- 大小为 2 的结构 b 包含答案
到目前为止我已经...
&(*(b+i))->s = (*(*(a+i)+j)).s * (*(x+k)).s
但是我收到编译器错误
error: lvalue required as left operand of assignment
编辑:
我的结构
typedef struct num{
int s;
}num_t;
我的函数参数
void calc(int n, int m, num_t **a, num_t *x, num_t *b)
此外,问题的措辞是否正确?
EDIT2:格式