📄 writebackward2.cpp
字号:
#include <iostream>using namespace std;struct Node{ char item; Node *next;}; // end structvoid writeBackward2(Node *stringPtr)// ---------------------------------------------------------// Writes a string backward.// Precondition: The string is represented as a linked list// to which the pointer stringPtr points.// Postcondition: The string is displayed backward. The// linked list and stringPtr are unchanged.// ---------------------------------------------------------{ if (stringPtr != NULL) { // write the string minus its first character backward writeBackward2(stringPtr->next); // write the first character cout << stringPtr->item; } // end if} // end writeBackward2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -