User Profile

Collapse

Profile Sidebar

Collapse
lloopy
lloopy
Last Activity: Aug 10 '07, 03:42 PM
Joined: Jul 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • lloopy
    replied to circular struct reference in c++
    in C
    Thanks for the help. I started rearchitecting my code, but decided that simply using extern would fix the issue.
    See more | Go to post

    Leave a comment:


  • lloopy
    replied to circular struct reference in c++
    in C
    The code sample I included was a demonstration of the concept.

    The actual structure is somewhat more complicated.

    There are 120 nodes. Each node keeps a list of three types of neighbors, as well as 7 other pieces of information.

    This seems more cumbersome:
    ------------------
    node1.neighbor_ type1[0]=&node2;
    node1.neighbor_ type1[1]=&node3;
    node1.neighbor_ type1[2]=&node4;...
    See more | Go to post

    Leave a comment:


  • lloopy
    started a topic circular struct reference in c++
    in C

    circular struct reference in c++

    I am trying to represent a map using nodes. This code segment seems to work just fine in C, but craps out in C++.

    struct node{
    char name[50];
    struct node* neighbors[6];
    };

    struct node one;
    struct node two;
    struct node three;

    struct node one={"one",
    {&two, &three}
    };

    struct node two={"two",
    ...
    See more | Go to post
No activity results to display
Show More
Working...