c04p199.txt

来自「Data Abstraction & Problem Solving with 」· 文本 代码 · 共 15 行

TXT
15
字号
// Saves a linked list誷 data in a text file of// integers; head points to the linked list.// fileName is a string that names an external text// file to be createdofstream outFile(fileName);// traverse the list to the end, writing each itemfor (Node *cur = head; cur != NULL; cur = cur->next)   outFile << cur->item << endl;outFile.close();// Assertion: The text file contains the linked// list誷 data in its original order.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?