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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:00:24+00:00 2026-06-11T15:00:24+00:00

Hi everyone I’m running into problems with placing a c struct in a header

  • 0

Hi everyone I’m running into problems with placing a c struct in a header file so it can be shared. I haven’t found a solution yet that actually compiles without error so I can’t figure out what I am doing wrong.

Header File awget.h

#ifdef awget_H
#define awget_H

typdef struct List{
char IPs;
}List;

#endif

Source File awget.c

#include "awget.h"
int main(int argc, char *argv[]) 
{
 List receiveHere;
 struct List sendHere;

 return 0;
}

The first declaration in the source file returns, “error: unknown type name ‘List’”.
The second declaration returns, “error: storage size of ‘sendHere’ isn’t known”.

From what I’ve been able to gather the first should be a legal declaration, but I’m clearly doing it wrong. I’ve tried extern and typedefs and read every c struct in header article I could find to try to properly understand how to put a struct in a header to no avail, let alone something that compiled properly.

Can someone either point me in the direction of a proper resource or shed some light on what I have setup incorrectly? Thank you for your time.

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

    1) It is #ifndef, as in ‘if not defined’ you should use.

    Change

    #ifdef awget_H

    with

    #ifndef awget_H

    2) It is typedef not typdef.

    3) If it is not C++, it must be List sendHere not struct List sendHere.

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

Sidebar

Related Questions

Everyone, every blog is talking about HTML 5 and giving solution to use HTML
everyone! I try to update values in .resx file with ResXResourceWriter and the value
everyone..i want after i type 0203-ED in textfield ...two character behind that text can
Everyone who's done any web application development in Scala knows that you can use
everyone, I have a big file in the format given below. The data is
everyone, i found this strange problem ( maybe it is a feature ) this
everyone. Can someone share some links on articles about back end caching and fragment
Everyone is talking about NodeJS so I though I'll look into it by creating
Everyone managing open-source-software runs into the problem, that with the time the process of
everyone, I have problems when using MVC3 code is as follows public SystemController(IRepository repository)

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.