Thread: struct and extern

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    8

    Cool struct and extern

    hello,

    typedef struct __test
    {
    int x;
    } TEST;

    extern TEST t;

    Is this the valid statement?, If so, what is the linkage the variable 't' is going to keep?

    Regards,
    JGtech.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > Is this the valid statement?
    Did you try? I think it is valid.

    > If so, what is the linkage the variable 't' is going to keep?
    Go on, make a guess - let's see if you're right.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extern Struct from .h file not finding elements
    By Fillis52 in forum C Programming
    Replies: 5
    Last Post: 11-19-2010, 07:27 AM
  2. cannot compile with extern struct
    By jeanluca in forum C Programming
    Replies: 4
    Last Post: 06-08-2009, 02:51 AM
  3. extern struct
    By beginner.c in forum C Programming
    Replies: 10
    Last Post: 07-01-2007, 07:43 PM
  4. Replies: 17
    Last Post: 12-15-2006, 11:02 AM
  5. extern struct...
    By Supar in forum C++ Programming
    Replies: 7
    Last Post: 01-07-2003, 02:58 PM