描述建设一个网站的基本步骤,搜索排名查询,如何把电脑改成服务器 做网站,网站建设使用哪种语言好在本文中,我们主要介绍链表打印的内容,自我感觉有个不错的建议和大家分享下 每日一道理 生命不是一篇文摘#xff0c;不接受平淡#xff0c;只收藏精彩。她是一个完整的过程#xff0c;是一个连载#xff0c;无论成功还是失败#xff0c;她都不会…在本文中,我们主要介绍链表打印的内容,自我感觉有个不错的建议和大家分享下 每日一道理 生命不是一篇文摘不接受平淡只收藏精彩。她是一个完整的过程是一个连载无论成功还是失败她都不会在你背后留有空白生命也不是一次彩排走得不好还可以从头再来她绝不给你第二次机会走过去就无法回头。 #include stdlib.h
#include stdio.h
#include stack
#include algorithm
using namespace std;struct ListNode{int m_Value;ListNode *m_pNext;
}*List;
bool deleted false;
void AddNodeToTail(ListNode** pHead,int value){ListNode* pNew new ListNode();pNew-m_Value value;pNew-m_pNext NULL;if (NULL *pHead){*pHeadpNew;}else{ListNode* pNode*pHead;while(pNode-m_pNext!NULL)pNode pNode-m_pNext;pNode-m_pNextpNew;}
}void PrintListFromTail(ListNode* pHead){std::stackint nodes;ListNode* pNodepHead;while(NULL!pNode){nodes.push(pNode-m_Value);pNodepNode-m_pNext;}printf(从尾到头打印链表\n);while(!nodes.empty()){printf(%d,nodes.top());nodes.pop();if(!nodes.empty())printf(-);}
}int main(void){for (int i0;i20;i){AddNodeToTail(List,i);}ListNode* pList;while(p!NULL){printf(%d,p-m_Value);p p-m_pNext;if(p!NULL)printf(-);}printf(\n);PrintListFromTail(List);getchar();return 0;
} 文章结束给大家分享下程序员的一些笑话语录 很多所谓的牛人也不过如此离开了你微软还是微软Google还是Google苹果还是苹果暴雪还是暴雪而这些牛人离开了公司自己什么都不是。转载于:https://www.cnblogs.com/jiangu66/archive/2013/05/05/3061710.html