B D都正确。。。
我验证过的。。你可以试试
#include
using namespace std;
struct list
{
int data;
list *prior;
list *next;
};
int main()
{
list *p, *s, *q;
p = new list;
q = new list;
s = new list;
p->data = 1;
s->data = 2;
q->data = 3;
p->next = q;
q->prior = p;
p->next->prior=s;s->next=p->next;s->prior=p;p->next=s;
cout << p->data << endl;
cout << p->next->data << endl;
cout << p->next->next->data;
}
B D都正确。。。
1223