Untitled

 avatar
unknown
plain_text
a month ago
514 B
4
Indexable

#include <iostream>
#include <vector>
#include <list>
using namespace std;




int main()
{
    int n = 2;
    struct List {
        string id;
        int data;
        List* next;
    };
    List List1, List2, List3;
    List1.data = 120;
    List2.data = 234;
    List3.data = 32;
    List1.next = &List2;
    List2.next = &List3;
    List temp = List1;
    for (int i = 1;i <= n;i++)
    {
        cout << temp.next->data;
        temp = *temp.next;
    }

    return 0;
}

Editor is loading...
Leave a Comment