Lỗi biên dịch khi chạy code Danh sách liên kết đơn

Mình đang làm bài tập về Danh sách liên kết đơn, ngồi code cả gần buổi tối rồi mới debug thì dính phải lỗi này. Lỗi này là do mình sai hay do trình biên dịch cũ vậy mn ?
Lỗi dòng thứ 13 ạ.

#include <stdio.h>
#include <conio.h>
#include <string.h>
typedef char infor1[15];
typedef float infor2;
typedef int infor3;
const int Nmax = 100;
struct element
{
    infor1 ht;
    infor2 cc;
    infor3 cntc;
    element *next;
};
typedef element *List;
void Create(List A)
{
    printf("Nhap ho va ten : ");
    gets((*A).ht);
    printf("Nhap chieu cao :");
    scanf("%f",&(*A).cc);
    (*A).cntc = (*A).cc * 100 - 105;
    fflush(stdin);
}
void Nhap_DS(List A)
{
    Create(A);
    List F;
    (*A).next = F;
    char check;
    printf("Tiep tuc (y/n) :");
    scanf("%c",&check);
    fflush(stdin);
    while(check == 'y')
    {
        printf("Nhap ho va ten : ");
        gets((*F).ht);
        printf("Nhap chieu cao :");
        scanf("%f",&(*F).cc);
        (*F).cntc = (*F).cc * 100 - 105;
        fflush(stdin);
        printf("Tiep tuc (y/n) :");
        scanf("%c",&check);
        F = (*F).next;
    }
    delete F;
}
void Xuat_DS(List A)
{
    List p;
    p = A;
    while(p != NULL)
    {
        printf("%s\t%.2f\t%d",(*p).ht,(*p).cc,(*p).cntc);
        p = (*p).next;
    }
}
int main()
{
    List p;
    Nhap_DS(List A);
    Xuat_DS(List A);
    return 0;
}

Dòng 13 phải là struct element *next :slight_smile: đây là C.

6 Likes
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?