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

  • SEARCH
  • Home
  • 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 8657825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:37:02+00:00 2026-06-12T15:37:02+00:00

I am getting these errors in my code. I am sure these are just

  • 0

I am getting these errors in my code. I am sure these are just because of some single mistake, but I am unable to find it. Please help me!

2010\projects\firstnamelastname\firstnamelastname\testing.cpp(15): error C2065: 'node' : undeclared identifier
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(15): error C2065: 'linked_list2' : undeclared identifier
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(26): error C2065: 'linked_list2' : undeclared identifier
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(29): error C2065: 'linked_list2' : undeclared identifier
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(29): error C3861: 'createQueue': identifier not found
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(35): error C2065: 'linked_list2' : undeclared identifier
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(38): error C2065: 'linked_list2' : undeclared identifier
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(38): error C3861: 'addFront': identifier not found
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(45): error C2065: 'linked_list2' : undeclared identifier
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(45): error C2065: 'linked_list2' : undeclared identifier
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(45): error C3861: 'dQueue': identifier not found
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(48): error C2065: 'linked_list2' : undeclared identifier
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(48): error C3861: 'destroyList': identifier not found
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(52): error C2065: 'linked_list2' : undeclared identifier
1>c:\users\omer\documents\visual studio 2010\projects\firstnamelastname\firstnamelastname\testing.cpp(52): error C3861: 'printList': identifier not found

Below are Three Files
File 1 >> testing.cpp

//#include<stdio.h>
#include<stdlib.h>
#include "queue.h"
#include "linklist.h"
#include"stdafx.h"

int main(void)
{   
    int x,n;
    int number;
    int i;

    node *linked_list2= NULL;


        while (1) 
        {           
            printf("1.)To create Queue\n2.)To nQueue\n3.)To dQueue\n4.)To Destroy Queue\n5.)To Print The Queue\n6.)Exit Program\nPrint Your Choice: ");
            scanf("%d",&n);

            switch (n) /*Switch statement for testing of different functions*/
            {
                case 1:
                    if(linked_list2 == NULL){
                        printf("Enter Value Please\n");
                        scanf("%d",&number);
                        linked_list2=createQueue(number);
                    }
                    else
                        printf("Queue already created\n.");
                break;
                case 2:
                    if(linked_list2 != NULL){
                        printf("Give a no. to add: ");
                        scanf("%d",&number);
                        addFront(linked_list2,number);
                    }
                    else
                        printf("Create Link List First\n.");

                break;
                case 3:
                    linked_list2=dQueue(linked_list2);
                break;
                case 4:
                    destroyList(linked_list2);
                printf("List is Empty!! So Exiting Program! Bye!!\n");   /*Exits program after the list is emptied*/
                break;
                case 5:
                printList(linked_list2);
                break;
                case 6:
                printf("Exiting Program");
                return 0;
                break;
                default:
                printf("Wrong Input!!! Please Input Again: ");        /*asks to input the choice again if its incorrect*/
                scanf("%d",&n);

            }
        }

    return 0;
}

File 2 >> queue.h

#include"linklist.h"

node * dQueue(node *num)   /*Deletes the value of the node from the front*/
{
    //num = num->next;  
    return (num->next);
}


void nQueue (node *head, int num ) /*Adds node to the front of Linked-List*/
{
    addFront(head,num);
}

node* createQueue(int val){

    return createList(val);
}

File 3 >> linklist.h

struct node{
    node * next;
    int nodeValue;
};

node* initNode(int number);
node* createList (int value);
void addFront (node *head, int num );
void deleteFront(node*num);
void destroyList(node *list);
int getValue(node *list);
void printList(node *list);

I have bodies of these function in linklist.cpp.

  • 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-12T15:37:03+00:00Added an answer on June 12, 2026 at 3:37 pm

    In C, declaring struct foo does not introduce a type called foo.

    You need to:

    • Say struct node wherever you say node,
    • or add typedef struct node node.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting these errors in some java code http://tutorials.jenkov.com/java-multithreaded-servers/multithreaded-server.html Exception in thread Thread-0 java.lang.RuntimeException: Cannot
I keep getting these 2 errors in my code In function 'int main()': error:
I am getting these two errors. Error: Could not find or load main class
I'm getting some Unresolved External Errors I can't seem to find a solution for:
I've been getting these errors intermittently from sending email from my django app. I
Using an opencart plugin I am getting these errors in my apache error log
Hello I am getting these LNK errors when I try to compile my MySQL
I'm getting loads of these errors reported when a user tries to download a
Hello not sure why Im getting this error. Basically I get it in these
I'm just getting started with Visual Studio (2010 Beta) and have some basic questions

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.