// recursePrintList.cpp : 定义控制台应用程序的入口点。
// 递归逆序打印链表(递归出口的三种写法)
#include "stdafx.h"
#include <iostream>
using namespace std;
struct node{
int value;
node* next;
};
node* createList();
void printList(node* head);
void reversePrint(node* ptr);
void reversePrint1(node* ptr);
void reversePrint2(node* ptr);
int _tmain(int argc, _TCHAR* argv[])
{
// 创建链表
采用递归逆序打印单链表(递归出口的三种写法)
最新推荐文章于 2025-04-10 23:13:40 发布