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;
}
0 comments:
Post a Comment