I have a header file that contains this function declaration:
bool isAbelianGroup(ConstGroupMemberP IdentityElement, ConstGroupMemberP members[],
const int membersLen, const binaryOp oper, const freeMember freeMember,
const GroupComparator compare);
I have ac file in which I implement this function (copy-pasted the prototype from the declaration in the h file)
bool isAbelianGroup(ConstGroupMemberP IdentityElement, ConstGroupMemberP members[],
const int membersLen, const binaryOp oper, const freeMember freeMember,
const GroupComparator compare){...}
and yet, I get an error for re-declaring with different type:
Any ideas what might be the problem?
Found the problem: I should have written const freeMember freeFunc
in both h and c files instead of const freeMember freeMember
.
That was hard to find.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.