c - 在 C 编程中读取文件到链表
问题描述
我是 C 编程的新手。我来到了链表这一章,我根本无法从这个任务中继续前进。你能告诉我如何根据提供的说明创建一个链接列表吗?
我需要将文本文件中的文本加载到链接列表中。
感谢帮助。
文本文件的模式如下所示:
room number
number of beds (the number of beds determines how many guests will be accommodated in the room and how many guests will be loaded in the linked list)
the price
#
guest name
address
#
guest name
address
---
etc.
文本文件如下所示:
514
2
12,5
#
John Smith
Street 25, New York
#
Kate Smith
Streer 25, New York
---
134
1
20
#
Michael Collins
Street 12, Nebraska
解决方案
推荐阅读
- python - 为命令添加冷却时间[Discord.py]
- active-directory - 搜索中的 Microsoft MMC ADUC 缺少属性编辑器选项卡
- javascript - 输入类型=当被 div 包含时不提交
- mysql - mySQL 将带有 Join 的 SELECT 转换为更新
- cakephp - cakePhp 中的简单查询问题
- sql - 使用 SQL Alchemy 在与 SQL 数据库的连接字符串中包含反斜杠
- c# - 有没有办法从所有 Outlook 的共享日历中检索事件(约会)?
- c# - WPF 控件,绑定到视图模型上的列表的属性,想在 Xaml 中定义列表
- azure-active-directory - 无法在 azure graph-api 中使用 RoleManagement API 端点获取
- javascript - React 类组件中带有真值或假值的复选框抛出错误?