如问题所示,我们可以从函数返回结构吗。
(struct spMat z) fastTranspose(struct spMat x[20])
{
//did the process to store transpose in z
return(z);
}
但现在我收到了错误 错误:预期的标识符或'(''''''''''''''''''''''
有谁能告诉我我做错了什么?
提前完成。
答案 0 :(得分:0)
我想你想这样做:
struct spMat fastTranspose(struct spMat x[20])
{
//declare a new struct if you need
...
return x; // or the new struct which you declared before
}