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 8591681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:34:55+00:00 2026-06-11T23:34:55+00:00

It was long time since I coded in C and now I can’t even

  • 0

It was long time since I coded in C and now I can’t even create linked list 🙁 What might be wrong with NodeType structure ?
I even tried this example and still I get error similar to this.

I need to create linked list that would run on linux and windows (without huge modification).

I compile using: cl myFile.c command.

Error message:

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01
for 80×86 Copyright (C) Microsoft Corporation. All rights reserved.

unlock.c unlock.c(46) : error C2275: ‘Node’ : illegal use of this type
as an expression
unlock.c(17) : see declaration of ‘Node’ unlock.c(46) : error C2146: syntax error : missing ‘;’ before identifier ‘a’ unlock.c(46) :
error C2065: ‘a’ : undeclared identifier

Source code:

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


typedef enum {STABLE, RPUSH, LPUSH} STATUS_TYPE;


typedef struct NodeType
{
    struct NodeType* _left;
    struct NodeType* _right;
    int _value;
}Node;

typedef struct AnchorType
{
    struct Node* _mostLeft;
    struct Node* _mostRight;
    STATUS_TYPE _status;
} Anchor;

Node CreateNode(int data)
{
    Node newNode;
    newNode._value = data;
    newNode._left = NULL;
    newNode._right = NULL;

    return newNode;
}


int main()
{
    Anchor anchor;
    anchor._mostLeft = NULL;
    anchor._mostRight = NULL;
    anchor._status = STABLE;


    Node a; //<-- What might be wrong ?

    return 0;
}

Thanks for help.

  • 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-11T23:34:56+00:00Added an answer on June 11, 2026 at 11:34 pm

    Microsoft focuses on C++ compilers, and their C support is decades out of date.

    One of the features of the newer C standards that isn’t supported in Microsoft’s compiler is the ability to declare variables in the middle of a function.

    Move the declaration to the top, and everything will be ok:

    int main()
    {
        Anchor anchor;
        Node a; // ok here
        anchor._mostLeft = NULL;
        anchor._mostRight = NULL;
        anchor._status = STABLE;
    
    
        //Node a; but not here
    
        return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Its a long time since I've used C but now I'm trying to compile
It's been now a long time since I try to figure out how to
I been using VS2008 Pro for a long time now but since of licensing
I've been using SVN since a long time and now we're trying on Git.
Been a loooooong time since I've actually coded straight c (not even C++ but
It's been a long time since I've done C++ and I'm running into some
It has been a long time since I used java and I have run
It's been a long time since I've had to deal with Win32 menus. I
I use prototype since a long time, but for some reason I have to
it's a long time since I try to compile OpenCV2.0 in Windows successfully but

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.