类似失之东隅,收之桑榆:C++ 简单问题

来源:百度文库 编辑:高校问答 时间:2024/05/12 07:50:25
struct node
{
int info;
struct node* link;
}*h1,*p,*q,*r,*h2;//q在这里定义了
.
.
.

void print(node *list)
{
int j(0);//j为计数器
q=list;
while(q)//遍历连表
{
q=q->link;
printf("%d",q->info);//这里怎么错了?
j++;
j%4?printf("\t"):printf("\n");
}
}