当前位置: 动力学知识库 > 问答 > 编程问答 >

c - can anyone help me with before '&' token error?

问题描述:

In the below code

void tread(gonptr &head){

int coefficient, exponent;

scanf("%d",&n);

I'm having this kind of error when compiling

main.c:59:25: error: expected ';', ',' or ')' before '&' token

void pwrite(PolyPointer &head){

can anyone help?

网友答案:

As per the code visible in the error message, you need to change

void pwrite(PolyPointer &head)

to

void pwrite(PolyPointer *head)

In C, there is no reference thing, it's all about pointers.

As pointed out by Mr. @zenith in the comments,the same is applicable for tread() also.

N.B : Code related to tread() function is irrelevant to this particular error message, anyway.

分享给朋友:
您可能感兴趣的文章:
随机阅读: