Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8865863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:37:54+00:00 2026-06-14T16:37:54+00:00

Usually when I get this error, creating a new project and copy paste the

  • 0

Usually when I get this error, creating a new project and copy paste the code fix that but now it doesn’t.

Here is the output:

1>------ Build started: Project: myList, Configuration: Debug Win32 ------
1>  List.cpp
1>List.obj : error LNK2019: unresolved external symbol "void __cdecl printStd(struct Student >*)" (?printStd@@YAXPAUStudent@@@Z) referenced in function _main
1>C:\Users\Talmid\Desktop\אמרי\C\myList\Debug\myList.exe : fatal error LNK1120: 1 unresolved >externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

And the code:

#include <stdio.h>
#include <stdlib.h>

#define SUCCESS 1
#define FAILURE 0

// A definition of some information type:
typedef struct
{
char name[20];
int id;
}Student;

// A definition of a single node
typedef struct node_s
{
Student data;
struct node_s *next;
}Node;

// a definition of "list manager":
typedef struct
{
Node *start;
int num;
}List;

List *createList();
int insertToList(List *ptrList, Student *ptrStu);
int removeFirst(List *ptrList, Student *ptrStu);
Node *getRecord(List *ptrList, int recNum);
void printList(List *ptrList);
void printRec(Node *ptrNode);
void printStd(Student *std);
void freeList(List *ptrList);
void shutDown(List *ptrList);

//Creates a new 'list manager', initializes it and returns its value;
List *createList()
{
    List *ptrNewList = (List *)malloc(sizeof(List));
    if(ptrNewList)
    {
        ptrNewList->start = NULL;
        ptrNewList->num = 0;
    }
    return ptrNewList;
}

// free 'list manager'
void shutDown(List *pList)
{
    if(pList != NULL)
        free(pList);
}

// inserts one record a the head of the list
int insertToList(List *ptrList, Student *ptrStu)
{
    Node *ptrNewNode = (Node *)malloc(sizeof(Node));
    if(ptrNewNode)
    {
        ptrNewNode->data = *ptrStu;
        ptrNewNode->next = ptrList->start;
        ptrList->start = ptrNewNode;
        ptrList->num++;
        return SUCCESS;
    }
    return FAILURE;
}

// remooves the first node from the list
int removeFirst(List *ptrList, Student *ptrStu)
{
    Node *ptrDel;
    if(ptrList->start != NULL)
    {
        ptrDel = ptrList->start;
        ptrList->start = ptrDel->next;
        ptrList->num--;
        *ptrStu = ptrDel->data;
        free(ptrDel);
        return SUCCESS;
    }
    return FAILURE;
}

// gets the data of the recNum node
Node *getRecord(List *ptrList, int recNum)
{
    Node *ptrNode;
    int nodeNum = 1;
    ptrNode = ptrList->start;
    while((nodeNum<recNum) && (ptrNode != NULL))
    {
        ptrNode = ptrNode->next;
        nodeNum++;
    }
    return ptrNode;
}

// prints the entire list
void printList(List *ptrList)
{
    Node *ptrNode;
    int i;
    ptrNode = ptrList->start;

    i = 1;
    while(ptrNode != NULL)
    {
        printf("%2d: ",i);
        printRec(ptrNode);
        ptrNode = ptrNode->next;
        i++;
    }
    printf("\n");
}

// prints a given record
void printRec(Node *ptrNode)
{
    printf("name is %10s, id is %d.\n", ptrNode->data.name, ptrNode->data.id);
}

// prints a given student
void printSt(Student *std)
{
    printf("name is %10s, id is %d.\n", std->name, std->id);
}

//free all nodes (dynamic allocation)
void freeList(List *ptrList)
{
        Node *ptrDel;
    if(ptrList != NULL)
    {
        ptrDel = ptrList->start;
        while(ptrDel)
        {
            ptrList->start = ptrDel->next;
            free(ptrDel);
            ptrDel = ptrList->start;
        }
    }
}

void main()
{
    List *l1 = NULL;
    Node *n1 = NULL;
    Student *s1 = NULL;
    int i, status;
    int wantedIndexElement = 3;
    Student studentsArr[] = {
                                {"Rina",134},
                                {"Tomer",22307},
                                {"Rotem",3732},
                                {"Yosef",773},
                                {"Anat",9998},
                                {"Vered",14555},
                                {"Malkishua",878},
                                {"David",6543},
                                {"Yigal",9870},
                                {"Beni",123}
                            };
    int arrLen = sizeof(studentsArr)/sizeof(Student);
    l1 = createList();
    if(l1 == NULL)
    {
        printf("problem to allocate List (list manager)\n");
        exit(1);
    }
    for(i=0;i<arrLen;i++)
    {
        status = insertToList(l1,&studentsArr[i]);
        if(status == FAILURE)
        {
            printf("Failed to insert to the list!!!\n");
            exit(1);
        }
    }
    printList(l1);
    n1 = getRecord(l1,wantedIndexElement);

    if(n1 != NULL)
        printRec(n1);
    else
        printf("No such element %d \n",wantedIndexElement);



    s1 = (Student *)malloc(sizeof(Student));
    if (removeFirst(l1,s1) == FAILURE)
    {
        printf("Failed to remove from list!!!\n");
            exit(1);
    }

    printf("The   student has been deleted:\n");
    printStd(s1);


    freeList(l1);
    shutDown(l1);
    l1 = NULL;
    putchar('\n');
    getchar();
}

Since it’s a long code you don’t really need to check it, there are no mistakes.. even the console said so 😀

So what this error means?why do I get it?how can I fix it? it leads me to an exe that doesn’t even exist.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:37:55+00:00Added an answer on June 14, 2026 at 4:37 pm

    void printStd(Student *std) -> This is what you have declared.

    void printSt(Student *std) -> This is the function name you wrote

    “unresolved external symbol “void __cdecl printStd” The compiler is telling you it can’t find any function named printStd which you have decalred.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Usually, I get this error: (The service name service on Local Computer started and
Every now and then we get this error from some of our old ASP
I'm still trying to run my easyhook exercize. right now, i get this error:
I am creating a program that allows you to paste text but it will
I usually get this error and (always) don't know how to solve it. This
Usually, in order to launch a new Activity and get its result, from an
I get from another class string that must be converted to char. It usually
When I want to get to a web, I usually have to do code
Usually I worked with PostgreSQL and never had a problem, but now I need
I'm creating a demo that must be in html code only (no server side

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.