Data structures 数据结构。对`系统';的未定义引用|
我如何返回新的列表,该列表的等级高于或等于特定等级。我试过这个 我遇到的问题 对“系统”的未定义引用| ||错误:ld。返回1退出状态|Data structures 数据结构。对`系统';的未定义引用|,data-structures,Data Structures,我如何返回新的列表,该列表的等级高于或等于特定等级。我试过这个 我遇到的问题 对“系统”的未定义引用| ||错误:ld。返回1退出状态| typedef struct node *nodeptr; struct node { int s_num; float avg; char branch[9]; nodeptr next; }; typedef nodeptr LIST; typedef nodeptr Position; main(){ LIST l=(n
typedef struct node *nodeptr;
struct node
{
int s_num;
float avg;
char branch[9];
nodeptr next;
};
typedef nodeptr LIST;
typedef nodeptr Position;
main(){
LIST l=(nodeptr)malloc(sizeof(struct node));
Position p=l->next;
p=(get_gradesAbove(list))->next;
while(p!= NULL){
printf("%d\t%0.1f",p->s_num,p->avg);
p=p->next;
scanf("%s");
system("cls");
}
return 0;
List get_gradesAbove(LIST l){
LIST list=createList;
Position p=l->next;
float grade;
printf("Enter grade to print nodes above or equals to = ");
scanf("%f",&grade);
while(p != NULL){
if(p->avg >= grade)
insert(list,p);
p=p->next;
}
return list;
}
}