笔迹鉴别程序

考试的笔迹鉴别程序,分辨出不同人写的笔迹
This commit is contained in:
yanshui177
2017-05-17 16:50:37 +08:00
parent abe00d2e02
commit 962de04ffb
205 changed files with 17672 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
/* 程序名getFiles.c
功能:返回一个文件夹下的所有文件名
*/
#include<io.h>
#include <stdio.h>
#include<vector>
#include<iostream>
#include <string.h>
#include <string>
using namespace std;
int searchDir( char *path, vector<string> &dir)
{
using namespace std;
struct _finddata_t fa;//创建找到的结构体
long handle;
int flag=0;
char temp[100]={0};
string path_temp=path;
// path_temp=path_temp.substr(0,path_temp.length()-1);
if((handle = _findfirst(strcat(path,"*"),&fa)) == -1L)//如果不是目录的话
return 0;
do//是目录,先执行循环
{
if( fa.attrib == _A_SUBDIR && ~strcmp(fa.name,".")&& ~strcmp(fa.name,".."))
{
strcat( temp, path_temp.c_str());
strcat( temp, fa.name);
if(flag++)
dir.push_back(temp);
else;
memset(temp,0,100);
}
}while(_findnext(handle,&fa) == 0); /* 成功找到时返回0*/
_findclose(handle);
return 0;
}