include[HTML_REMOVED]
using namespace std;
struct Node{
int val;
Node * next;
Node(int _val):val(_val),next(NULL){}
};
int main()
{
Node p= new Node(1);
Node b= new Node(2);
p->next=b;
Node*head =p;
//插入a
Node * a= new Node(3);
a->next=p;
head=a;
//遍历
for(Node* i=head;i;i=i->next)
{
cout<[HTML_REMOVED]val<[HTML_REMOVED]next=head->next->next;
//遍历
cout<<”。。。。。。。。。。”<[HTML_REMOVED]next)
{
cout<[HTML_REMOVED]val<<endl;
}
return 0;
}