欢迎来到天天文库
浏览记录
ID:38645648
大小:122.00 KB
页数:26页
时间:2019-06-17
《个性化推荐系统代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Newstj.h#includeusingnamespacestd;classnewsdy{public:stringnewsid;inttimes;newsdy*next;newsdy();};classnewstj{public:intsum;stringnewsid;newstj*next;newsdy*NDYnext;newstj();};Newstj.cpp#include"StdAfx.h"#include"newstj.h"newsdy::newsdy(){newsid="";times=0;next=NU
2、LL;}newstj::newstj(){newsid="";next=NULL;sum=0;NDYnext=newnewsdy;}Recommend.h//Recommend.h:PROJECT_NAME应用程序的主头文件//#pragmaonce#ifndef__AFXWIN_H__#error"在包含此文件之前包含“stdafx.h”以生成PCH文件"#endif#include"resource.h"//主符号//CRecommendApp://有关此类的实现,请参阅Recommend.cpp//classCRecommendA
3、pp:publicCWinApp{public:CRecommendApp();//重写public:virtualBOOLInitInstance();//实现?DECLARE_MESSAGE_MAP()};externCRecommendApptheApp;Recommend.cpp//Recommend.cpp:定¡§义°?应®
4、用®?程¨¬序¨°的Ì?类¤¨¤行D为a。¡ê//#include"stdafx.h"#include"Recommend.h"#include"RecommendDlg.h"#ifdef_DEBUG#d
5、efinenewDEBUG_NEW#endif//CRecommendAppBEGIN_MESSAGE_MAP(CRecommendApp,CWinApp)ON_COMMAND(ID_HELP,&CWinApp::OnHelp)END_MESSAGE_MAP()//CRecommendApp构造CRecommendApp::CRecommendApp(){//支持重新启动管理器m_dwRestartManagerSupportFlags=AFX_RESTART_MANAGER_SUPPORT_RESTART;//TODO:在此处添加构造
6、代码//将?所¨´有®D重?要°a的Ì?初?始º?化¡¥放¤?置?在¨²InitInstance中D}//唯¡§一°?的Ì?一°?个?CRecommendApp对?象¨®CRecommendApptheApp;//Recommend.cpp:定¡§义°?应®
7、用®?程¨¬序¨°的Ì?类¤¨¤行D为a。¡ê//#include"stdafx.h"#include"Recommend.h"#include"RecommendDlg.h"#ifdef_DEBUG#definenewDEBUG_NEW#endif//CRecommendAppB
8、EGIN_MESSAGE_MAP(CRecommendApp,CWinApp)ON_COMMAND(ID_HELP,&CWinApp::OnHelp)END_MESSAGE_MAP()//CRecommendApp构1造¨¬CRecommendApp::CRecommendApp(){//支¡ì持?重?新?启?动¡¥管¨¹理¤¨ª器¡Âm_dwRestartManagerSupportFlags=AFX_RESTART_MANAGER_SUPPORT_RESTART;//TODO:在¨²此ä?处ä
9、添¬¨ª加¨®构1造¨¬代䨲码?,
10、ê?//将?所¨´有®D重?要°a的Ì?初?始º?化¡¥放¤?置?在¨²InitInstance中D}//唯¡§一°?的Ì?一°?个?CRecommendApp对?象¨®CRecommendApptheApp;//CRecommendApp初?始º?化¡¥BOOLCRecommendApp::InitInstance(){//如¨?果?一°?个?运?行D在¨²WindowsXP上¦?的Ì?应®
11、用®?程¨¬序¨°清?单Ì£¤指?定¡§要°a//使º1用®?ComCtl32.dll版ã?本À?6或¨°更¨¹高?版ã?本À?来¤¡ä启?用®
12、?可¨¦视º¨®化¡¥方¤?式º?,ê?//则¨°需¨¨要°aInitCommonControlsEx()。¡ê否¤?则¨°,ê?将?无T法¤¡§创ä¡ä建¡§窗ä¡ã口¨²。¡êINITCOMMONCON
此文档下载收益归作者所有