摘要:
一、概述 案例:使用ifstream从文件中一行一行读取数据,并对数据进行分割 #include <fstream> #include <string> #include <stdio.h> #include <stdlib.h> 二、代码示例 string filename = string("/ 阅读全文
摘要:
一、概述 案例:实现一个小功能,遍历文件目录并将目录下的文件路径写入一个文件中。做这个小功能是为了OpenCV的人脸识别准备数据。(文件路径后面跟上文件所对应的标签) 需要导入的头文件: #include <fstream> #include <string> #include <sys/types 阅读全文