# 第三次作业 **Repository Path**: xpandji/third_homework ## Basic Information - **Project Name**: 第三次作业 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-27 - **Last Updated**: 2020-12-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 第三次作业 #### 项目的简介及其相关的用法 wc.exe 是一个常见的工具,它能统计文本文件的字符数、单词数和行数。这个项目要求写一个命令行程序,模仿已有wc.exe 的功能,并加以扩充,给出某程序设计语言源文件的字符数、单词数和行数,并且拓展的功能有统计行、空行、注释行。 本项目的命令模式: wc -c hello.txt 统计字符数 wc -w hello.txt 统计单词数 wc -l hello.txt 统计句子数 wc -a hello.txt 统计行数 wc -b hello.txt 统计空行数 wc -m hello.txt 统计注释行 #### 文件列表及其说明 1. hello.txt 用于测试的纯英文文本 2. v0.1 空项目 3. v0.2 项目完成基础功能 4. v0.3 项目完成拓展功能 5. unit_test 基本功能及拓展功能的单元测试 #### 例程运行及其结果 基本的功能: ![统计字符数](https://images.gitee.com/uploads/images/2020/1127/193221_4e2a16f8_7901736.jpeg "wc_cc.jpg") 拓展功能: ![统计注释行](https://images.gitee.com/uploads/images/2020/1127/193359_4bb71a98_7901736.jpeg "wcmm.jpg") 单元测试: ![单元测试](https://images.gitee.com/uploads/images/2020/1127/193507_b93ec6b8_7901736.jpeg "unittest.jpg")