Thread: Can you use a structure in the declaration of itself?

  1. #16
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    Aaah! Don't go there Prelude, I'll get nightmares!
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  2. #17
    Registered User
    Join Date
    Nov 2006
    Posts
    19
    You are a great teacher!

  3. #18
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Code:
    struct foo {
      foo bar;
    };
    This seems a pretty evil piece of code.

    What's the size of this struct?
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  4. #19
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    Which is why it's wrong.
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  5. #20
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >What's the size of this struct?
    0, obviously.
    My best code is written with the delete key.

  6. #21
    Registered User
    Join Date
    Nov 2006
    Posts
    19
    As I recall, I loved pointers, thought they were the best things ever created. You could just spin 'em around where ever in the blink of an eye.

    Offsets yes, that's what they are called! Assembly, dare I even remember that far back? Nope, and I loved coding in assembly, folks thought I was nuts. I think it fit the way I think better than the newer languages do, except pascal, I loved pascal.

    OUtta here.

  7. #22
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Assembly is fun. Sometime I wan't to get away from that simplistic syntax and I start messing with Assembly.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  8. #23
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    Coding in protected mode assembly is fun. 16 bit real mode assembly with segments...not good.
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  9. #24
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Coding in protected mode assembly is fun. 16 bit real mode assembly with segments...not good.
    Hmm... never tried that. I wonder if I can do it with MASM.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 10:17 AM
  2. failure to import external C libraries in C++ project
    By nocturna_gr in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2007, 03:49 PM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  4. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM