資源簡介
對文章進行掃描并分析,檢查是否存在敏感詞匯并報告出現次數。
? 使用圖形用戶界面實現。
? 任意選擇一個文本文件,分析該文件,如果存在敏感詞匯,報告每個詞
出現的次數。敏感詞匯保存在sentive.txt 文件中,每個詞占一行,至少設置30
個敏感詞匯。系統中可以增加、刪除、修改敏感詞匯。

代碼片段和文件信息
//?SentiveFd.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“SentiveFd.h“
#include?“SentiveFdDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CSentiveFdApp
BEGIN_MESSAGE_MAP(CSentiveFdApp?CWinApp)
//{{AFX_MSG_MAP(CSentiveFdApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CSentiveFdApp?construction
CSentiveFdApp::CSentiveFdApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CSentiveFdApp?object
CSentiveFdApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CSentiveFdApp?initialization
BOOL?CSentiveFdApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CSentiveFdDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3633??2012-08-29?08:50??SentiveFd\ReadMe.txt
?????文件???????1009??2012-08-29?16:49??SentiveFd\resource.h
?????文件??????????3??2012-08-29?16:28??SentiveFd\sentive.txt
?????文件??????20492??2012-08-30?22:53??SentiveFd\SentiveFd.aps
?????文件???????1183??2012-08-30?22:54??SentiveFd\SentiveFd.clw
?????文件???????2105??2012-08-29?08:50??SentiveFd\SentiveFd.cpp
?????文件???????4217??2012-08-29?10:38??SentiveFd\SentiveFd.dsp
?????文件????????526??2012-08-29?08:50??SentiveFd\SentiveFd.dsw
?????文件???????1357??2012-08-29?08:50??SentiveFd\SentiveFd.h
?????文件??????74752??2012-08-30?22:54??SentiveFd\SentiveFd.ncb
?????文件????????846??2012-08-30?22:53??SentiveFd\SentiveFd.plg
?????文件???????5187??2012-08-29?16:49??SentiveFd\SentiveFd.rc
?????文件???????9175??2012-08-29?16:55??SentiveFd\SentiveFdDlg.cpp
?????文件???????1722??2012-08-29?16:37??SentiveFd\SentiveFdDlg.h
?????文件????????200??2012-08-28?12:34??SentiveFd\sentive_副本.txt
?????文件????????211??2012-08-29?08:50??SentiveFd\StdAfx.cpp
?????文件???????1054??2012-08-29?08:50??SentiveFd\StdAfx.h
?????文件???????1078??2012-08-29?08:50??SentiveFd\res\SentiveFd.ico
?????文件????????401??2012-08-29?08:50??SentiveFd\res\SentiveFd.rc2
?????文件?????????14??2012-08-30?06:25??SentiveFd\Debug\sentive.txt
?????文件????5489664??2012-08-30?22:53??SentiveFd\Debug\SentiveFd.bsc
?????文件?????122929??2012-08-30?22:53??SentiveFd\Debug\SentiveFd.exe
?????文件?????263672??2012-08-30?22:53??SentiveFd\Debug\SentiveFd.ilk
?????文件??????37624??2012-08-29?10:28??SentiveFd\Debug\SentiveFd.obj
?????文件????7169668??2012-08-29?10:28??SentiveFd\Debug\SentiveFd.pch
?????文件?????443392??2012-08-30?22:53??SentiveFd\Debug\SentiveFd.pdb
?????文件???????2584??2012-08-29?16:49??SentiveFd\Debug\SentiveFd.res
?????文件??????????0??2012-08-29?10:28??SentiveFd\Debug\SentiveFd.sbr
?????文件??????????0??2012-08-30?22:53??SentiveFd\Debug\SentiveFdDlg.sbr
?????文件?????105661??2012-08-29?10:28??SentiveFd\Debug\StdAfx.obj
............此處省略11個文件信息
評論
共有 條評論