CAR *removing(int *numberofstructures,CAR *first)
{
char categorytoerase[51];
CAR *helpnode,*actual;
int i;
int number_1=0;
helpnode=(CAR*)malloc(sizeof(CAR));
actual=(CAR*)malloc(sizeof(CAR));
actual=first;
number_1=*numberofstructures;
helpnode=NULL;
scanf("%s",categorytoerase);
for(i=1;i<=number_1;i++)
{
if (actual->znacka==categorytoerase)
{
if (helpnode != NULL) {
helpnode->next=actual->next;
free((void *)actual);
actual=helpnode->next;
}
else
{
first = actual -> next;
free((void *)actual);
actual = first;
}
}
else{
helpnode=actual;
actual=actual->next;
}
}
return first;
}
リンクされたリストからノードを削除する関数を作成したいのですが、最初に文字列を入力する必要があります。入力された文字列のような車のカテゴリ名を持つノードを消去する必要があります。