#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<list>
using namespace std;
int main(){
list<int> myList;
for (int i = 0; i < 10; i ++){
myList.push_back(i);
}
list<int>::_Nodeptr node = myList._Myhead->_Next;
for (int i = 0; i < myList._Mysize * 2;i++){
cout << "Node:" << node->_Myval << endl;
node = node->_Next;
if (node == myList._Myhead){
node = node->_Next;
}
}
system("pause");
return EXIT_SUCCESS;
}
————————————————
版权声明:本文为CSDN博主「塞外听雪」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_42754132/article/details/100058379
#include<iostream>
#include<list>
using namespace std;
int main(){
list<int> myList;
for (int i = 0; i < 10; i ++){
myList.push_back(i);
}
list<int>::_Nodeptr node = myList._Myhead->_Next;
for (int i = 0; i < myList._Mysize * 2;i++){
cout << "Node:" << node->_Myval << endl;
node = node->_Next;
if (node == myList._Myhead){
node = node->_Next;
}
}
system("pause");
return EXIT_SUCCESS;
}
————————————————
版权声明:本文为CSDN博主「塞外听雪」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_42754132/article/details/100058379