Pertemuan Keenam kali ini membahas tentang Link List.
Link List
#include <iostream>
using namespace std;
class Link{
public :
int data;
Link *next;
Link *back;
};
int main(int argc, char** argv) {
Link *a = new Link;
Link *b = new Link;
Link *c = new Link;
a->data = 1;
a->next = b;
b->data = 2;
b->next = c;
c->data = 3;
c->next= NULL;
cout<<a->next->data;
return 0;
}
Ya sekian pembahasan tentang Link List kali ini, semoga membantu... Terima Kasih.
Link List
#include <iostream>
using namespace std;
class Link{
public :
int data;
Link *next;
Link *back;
};
int main(int argc, char** argv) {
Link *a = new Link;
Link *b = new Link;
Link *c = new Link;
a->data = 1;
a->next = b;
b->data = 2;
b->next = c;
c->data = 3;
c->next= NULL;
cout<<a->next->data;
return 0;
}
Ya sekian pembahasan tentang Link List kali ini, semoga membantu... Terima Kasih.