Thread: Circular Linked List.

  1. #1
    Registered User
    Join Date
    Apr 2020
    Posts
    62

    Circular Linked List.

    How can I create and print a circular linked list which has two struct calls inside it?

  2. #2
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    1,106
    Quote Originally Posted by TheGreekMan2000 View Post
    How can I create and print a circular linked list which has two struct calls inside it?
    See my response to your other post here.

  3. #3
    Registered User
    Join Date
    Apr 2020
    Posts
    62
    Due to everyday life I don't have much time to spare in reading so it would be very helpful if you helped me out.

  4. #4
    misoturbutc Hodor's Avatar
    Join Date
    Nov 2013
    Posts
    1,791
    Quote Originally Posted by TheGreekMan2000 View Post
    How can I create and print a circular linked list which has two struct calls inside it?
    What is a "struct call"?

  5. #5
    Registered User
    Join Date
    Apr 2020
    Posts
    62
    We have two structs who are independent with each other. Also, we have a third struct which uses the other two. There is an example:

    Code:
    typedef struct
    {
        int year;
        int month;
        int day;
    }date;
    typedef struct
    {
        double latitude;
        double longitude;
    }location;
    typedef struct incList
    {
        date reported;
        location coordinates;
        struct incList *next;
    }incident;

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    The term is "member" not "call".

    Anyway, have you successfully done this with nodes containing one such member?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    Registered User
    Join Date
    Apr 2020
    Posts
    62
    Is it different from how to do it with only one struct?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. circular linked->list help
    By The Brain in forum C++ Programming
    Replies: 8
    Last Post: 10-21-2004, 11:12 AM
  2. Circular linked list
    By campermama in forum C++ Programming
    Replies: 7
    Last Post: 06-15-2004, 11:53 AM
  3. Circular Linked list ....
    By yescha in forum C Programming
    Replies: 1
    Last Post: 11-17-2001, 03:41 AM
  4. Again, Circular Linked list ???
    By yescha in forum C Programming
    Replies: 2
    Last Post: 11-16-2001, 08:35 PM
  5. Circular Linked List ??
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 11-14-2001, 02:12 PM

Tags for this Thread