Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

在 C 语言中 struct 是用户自定义数据类型;在 C++ 中 struct 是抽象数据类型,支持成员函数的定义。C++ 中的 class 可以实现 struct 的所有功能,C++ 为了兼容 C 语言保留了 struct 关键字。 C 语言中 struct 没有访问权限的设置,是一些变量的集合体,不能定义成员函数;C++ 中 struct 可以和类一样,有访问权限,并可以定义成员函数...

定义 NULL:预处理变量,是一个宏,它的值是 0,定义在头文件 中,即 #define NULL 0。 nullptr:C++ 11 中的关键字,是一种特殊类型的字面值,可以被转换成任意其他类型。 二者相比 nullptr 的优势 有类型,类型是 typdef decltype(nullptr) nullptr_t;,使用 nullptr 提高代码的健壮性。 函数重载:因为 NULL ...

1. 关键词 2. fileutil.h 3. fileutil.cpp 4. filesystem_win.h 5. filesystem_win.cpp 6. filesystem_unix.cpp 7. 源码地址 1. 关键词C++ 文件系统操作 拷贝文件 拷贝文件夹 跨平台 2. fileutil.h1234567891011121314151617181920212223242...

1. 关键词 2. fileutil.h 3. fileutil.cpp 4. list_files 5. 源码地址 1. 关键词C++ 文件系统操作 查找指定文件夹下的特定文件 跨平台 2. fileutil.h1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484...

1. 关键词 2. fileutil.h 3. fileutil.cpp 4. filesystem_win.h 5. filesystem_win.cpp 6. filesystem_unix.cpp 7. 源码地址 1. 关键词C++ 文件系统操作 列出指定目录下的所有文件 列出指定目录下的所有文件夹 跨平台 2. fileutil.h123456789101112131415161...

1. 关键词 2. fileutil.h 3. fileutil.cpp 4. filesystem_win.h 5. filesystem_win.cpp 6. filesystem_unix.cpp 7. 源码地址 1. 关键词C++ 文件系统操作 获取文件的大小 获取文件夹的大小 跨平台 2. fileutil.h1234567891011121314151617181920212...

1. 关键词 2. fileutil.h 3. fileutil.cpp 4. 源码地址 1. 关键词C++ 文件系统操作 读取纯文本文件 写入纯文本文件 跨平台 2. fileutil.h1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545...

1. 什么是迭代器? 2. 如何使用迭代器 3. C++迭代器说明 4. 迭代器的高级应用 4.1. Enumerator.hpp 4.2. Iterator.cpp 4.3. 输出结果 4.4. 更多详细代码 1. 什么是迭代器?迭代器(Iterator)是按照一定的顺序对一个或多个容器中的元素从前往遍历的一种机制,比如for循环就是一种最简单的迭代器,对一个数组的遍历也是一种的迭...

1. 关键词 2. fileutil.h 3. fileutil.cpp 4. filesystem_win.h 5. filesystem_win.cpp 6. filesystem_unix.cpp 7. 源码地址 1. 关键词C++ 文件系统操作 创建文件夹 创建多级目录文件夹 删除文件夹 删除文件夹下的所有文件和子目录 跨平台 2. fileutil.h1234567891011...

1. 关键词 2. fileutil.h 3. fileutil.cpp 4. filetype.h 5. filesystem_win.cpp 6. filesystem_unix.cpp 7. 源码地址 1. 关键词C++ 文件系统操作 创建文件 删除文件 创建软连接 刪除软连接 跨平台 2. fileutil.h12345678910111213141516171819202122...