这个交换为什么错了啊?
void inversion_arr(struct Arr *pArr){
int t;
struct Arr *i;
struct Arr *j;
i = pArr;
j = pArr+pArr->cnt;
while(i<j)
{
t = *i;
*i = *j;
*j = t;
i++;
j--;
}
报错:7.cpp
D:\c code\7.cpp(139) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'struct Arr' (or there is no acceptable conversion)
D:\c code\7.cpp(141) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'int' (or there is no acceptable conversion)
执行 cl.exe 时出错.
7.exe - 1 error(s), 0 warning(s)