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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:36:26+00:00 2026-05-23T18:36:26+00:00

ive got static struct ARP_entry ARP_table[ARP_TABLE_SIZE]; in start.c and I want to pass this

  • 0

ive got static struct ARP_entry ARP_table[ARP_TABLE_SIZE]; in start.c and I want to pass this table to a fill() function in table.c

ive got #include "table.c" in start.c, cause i need it for that function, right? if i include start.c in table.c it gets into some weird loop or what. Any suggestion?

The point is to declare the table in the start.c, fill it wit the information in table.c, and send it away from start.c

Thanks in advance

  • 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-05-23T18:36:26+00:00Added an answer on May 23, 2026 at 6:36 pm

    start.c

    #include "table.h" /* fill() */
    #include "arpheader" /* struct ARP_entry */
    
    int main(void) {
        static struct ARP_entry ARP_table[ARP_TABLE_SIZE];
        fill(ARP_table, sizeof ARP_table / sizeof *ARP_table);
        return 0;
    }
    

    table.c

    #include "table.h" /* self check */
    #include "arpheader" /* struct ARP_entry */
    
    int fill(struct ARP_entry *table, size_t n) {
      /* code */
      return 0;
    }
    

    table.h

    #ifndef H_TABLE_INCLUDED
    #define H_TABLE_INCLUDED
    
    #include <stddef.h> /* size_t */
    #include "arpheader" /* struct ARP_entry */
    int fill(struct ARP_entry *table, size_t n);
    
    #endif
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a compiled static library (with an a extension) I want to include
Ive got a std::map setup like this: static map<string, string> games; Inside a for
ok ive got this code: public static string ScreenScrape(string url) { System.Net.WebRequest request =
Hi I've got a static member of a templated class that I want defined
I've got a very simplistic application: #include <vector> void android_main(struct android_app* state) { }
Ive got a diamond. I want to access class member. I am using mingw.
I've got a static map of identifier<=>struct pairs, and each struct should contain some
I've got a static variable (abstract data type, not a primitive) in my C#
I've got an open source static JavaScript + HTML application that's deployed in about
I've got the following class: public static class Pages { public static string LoggedOut

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.