91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 199KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-16
  • 語言: C/C++
  • 標簽: c++??

資源簡介

主要是檢查作業(yè)是否有抄襲情況,他可以讀取txt格式的文本,是用c++寫的

資源截圖

代碼片段和文件信息

#include?“cpd.h“

using?namespace?std;

//?Debug?functions
/*
void?OutputHashTable(HawkEye?he?long?Key)
{
????cout?<????FileBlock?*ndPtr=?he.HashTable[Key];
????while(?ndPtr?!=?NULL?){
cout?<HashKey?< ndPtr=?ndPtr->Next;
????}
????cout?<}
*/

void?HawkEye::OutputFileBlock(FileBlock?*ndPtr)
{
#ifdef?DEBUGFUNCTION
????if(ndPtr?==?NULL)
cout?<????else{
????cout?<????cout?<StartPoint?<????cout?<Length?<????cout?<FileName?<????cout?<HashKey?<????cout?<????}
#endif
/*
????cout?<????for(i=?0;?i FileBlock?*fbp=?HashTable[i];
int?counter=?0;
while(?fbp?!=?NULL?){
????counter++;
????fbp=fbp->Next;
}
cout?<????}
????*/
}

/*
void?Scan(long?key)
{
????FileBlock?*ndPtr=?HashTable[key];
????int?Counter=?0;
????while(?ndPtr?!=?NULL?){
Counter++;
ndPtr=?ndPtr->Next;
????}
????cout?<}
*/

//?Independent?function
//?Repo
string?HawkEye::Suck(FileBlock?*fbp)
{
#ifdef?DEBUG_Suck
????cout?<????OutputFileBlock(fbp);
#endif
????string?ToBeReturned=?““;
????fstream?fin;
????fin.open(?(fbp->FileName).c_str()?fstream::in?);
????if(?!fin.good()?)
cout?<????fin.seekg(fbp->StartPoint);
????char?ch;
????for(i=?0;?iLength;?i++){
fin.read(?&ch?sizeof(char)?);
ToBeReturned+=?ch;
????}
????fin.close();
#ifdef?DEBUG_Suck
????cout?<#endif
????return?ToBeReturned;
}

string?HawkEye::GetFileName(string?AbsPath)
{
????int?dashpos?dotpos;
????dashpos=?AbsPath.rfind(‘/‘);
????if(dashpos?==?(int)string::npos)
//!?If?it?is?already?the?relative?path
dashpos=?-1;
????dotpos=?AbsPath.rfind(‘.‘);
????return?AbsPath.substr(dashpos+1?dotpos-dashpos-1);
}

string?HawkEye::GetSuffix(string?AbsPath)
{
????unsigned?int?dashpos?dotpos;
????dotpos=?AbsPath.rfind(‘.‘);
????if(dotpos?==?string::npos)
return?““;
????dashpos=?AbsPath.rfind(‘/‘);
????if(dashpos?==?string::npos)
//!?If?it?is?already?the?relative?path
dashpos=?0;
????return?‘.‘?+?AbsPath.substr(dotpos+1?AbsPath.size()-dotpos-1);
}

//?Independent?function
int?HawkEye::LCS(string?astr?string?bstr)
{
????/*
????unsigned?int?asize=?astr.size()
?bsize=?bstr.size();
????int?counter[asize+1][bsize+1];
????for(i=?1;?i<=?asize;?i++)
counter[i][0]=?0;
????for(i=?0;?i<=?bsize;?i++)
counter[0][i]=?0;
????for(i=?1;?i<=?asize;?i++)
for(j=?1;?j<=?bsize;?j++)
????if(?astr[i-1]?==?bstr[j-1]?)

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????835??2008-07-24?21:21??trunk\a.txt

?????文件??????15546??2008-07-24?22:28??trunk\cpd.cpp

?????文件???????3292??2008-07-24?21:49??trunk\cpd.h

?????文件?????158813??2008-07-24?22:28??trunk\cpd.o

?????文件????????734??2008-07-24?20:52??trunk\main.cpp

?????文件?????121933??2008-07-24?20:52??trunk\main.o

?????文件????????945??2008-07-24?22:28??trunk\Makefile.win

?????文件???????1567??2008-07-24?20:48??trunk\my.txt

?????文件???????1084??2008-07-24?21:11??trunk\mysecond.txt

?????文件????????827??2008-07-24?21:21??trunk\Repository\a

?????文件?????????22??2008-07-24?21:21??trunk\Repository\filelist.lst

?????文件??????21631??2008-07-24?21:21??trunk\Repository\hstb.txt

?????文件???????1551??2008-07-24?20:53??trunk\Repository\my

?????文件???????1076??2008-07-24?21:11??trunk\Repository\mysecond

?????文件????????827??2008-07-25?15:36??trunk\Repository\t.tmp

?????文件???????1058??2008-07-24?19:48??trunk\trunk.dev

?????文件?????650575??2008-07-24?22:28??trunk\trunk.exe

?????目錄??????????0??2008-07-24?21:21??trunk\Repository

?????目錄??????????0??2008-07-24?22:28??trunk

-----------?---------??----------?-----??----

???????????????982316????????????????????19


評論

共有 條評論