hello hello hello hello hello [on hold]
include #include #include #include #define _CRT_SECURE_NO_WARNINGS using namespace std; struct Node { int num; char name[20]; struct Node *next; }*front = NULL, *rear = NULL; void insert(int); void delet(); void display(); void main() { int choice, num; //clrscr(); printf("\n:: Queue Implementation using Linked List ::\n"); while (1) { printf("\n****** MENU ******\n"); printf("1. Insert\n2. Delete\n3. Display\n4. Exit\n"); printf("Enter your choice: "); scanf_s("%d", &choice); switch (choice) { case 1: printf("Enter the value to be insert: "); scanf_s("%d", &num); insert(num); break; case 2: delet(); break; case 3: display(); break; case 4: exit(0); default: printf("\nWrong selection!!! Please try again!!!\n"); } } } void insert(int num,char name[20]) { struct Node newNode; newNode = (struct Node)malloc(sizeof(struct Node)); newNode->num =num; newNode->name[20] =name[20]; newNode->next = NULL; if (front == NULL) front = rear = newNode; else { rear->next = newNode; rear = newNode; } printf("\nInsertion is Success!!!\n"); } void delet() { if (front == NULL) printf("\nQueue is Empty!!!\n"); else { struct Node *temp = front; front = front->next; printf("\nDeleted element: %d\n", temp->num); free(temp); } } void display() { if (front == NULL) printf("\nQueue is Empty!!!\n"); else { struct Node *temp = front; while (temp->next != NULL) { printf("%d--->", temp->num); temp = temp->next; } printf("%d--->NULL\n", temp->num); } system("pause"); }what is the problem Severity Code Description Project File Line Error LNK1120 1 unresolved externals Project3 && Severity Code Description Project File Line Error LNK2019 unresolved external symbol "void __cdecl insert(int)" (?insert@@YAXH@Z) referenced in function _main
Aucun commentaire:
Enregistrer un commentaire