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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:56:24+00:00 2026-06-06T14:56:24+00:00

I am having this structure in a .c file: struct entry { int position;

  • 0

I am having this structure in a .c file:

struct entry {
    int position;
    int length;
    struct entry *node;
};

Now, how can I limit the scope of this structure layout to the host file, so that when using the same name for a new structure layout in another file, I don’t get ‘redefinition’ error?

I tried using static before struct, but it seems of no use (I also doesn’t make sense). BTW, this question doesn’t seem valid to me, as that I get ‘redefinition’ error when duplicating stuct entry across linked files (using MinGW).

— Edit —
For those who want to know more: here, and here.

  • 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-06T14:56:26+00:00Added an answer on June 6, 2026 at 2:56 pm

    You won’t get a redefinition error. Types are local to translation units, and don’t have any visibility. Only functions and data objects have visibility.

    If you’re getting a redefinition error, you must be using that name in a header or other included file so it ends up in the same translation unit.

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

Sidebar

Related Questions

Having a table with this structure... Table_files id_file (PK) file_name file_path ... can I
I'm having difficulty with this problem. I have a table with this structure: OrderID
I'm having some trouble converting a parameter: I have this structure: class XMLCO {...};
Having a XML-structure like this: <ContextDoc> <PurchaseOrder xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema> <OrderForms> <OrderForm> <Shipments> <Shipment> ...
I'm having difficulties parsing a string. This is the structure I have: Title:Avatar,Year:2009,Rated:PG-13,Released:18 Dec
Im having trouble working grabbing a dynamically created image from this service: http://opsin.ch.cam.ac.uk/opsin/USER-STRUCTURE-TO-GENERATE.png Im
I'm having a little trouble as I decide how to structure my projects. This
Having this code: using (BinaryWriter writer = new BinaryWriter(File.Open(ProjectPath, FileMode.Create))) { //save something here
Hello there I am having some thoughts on my file structure in codeigniter.What I'm
I have an XML file with this structure: <?xml version=1.0 encoding=utf-8 ?> <Photobank> <Landowner

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.