摘要: #include #include #include using namespace std;using namespace boost::gregorian;const int MAX_SIZE = 1024;struct Person{string strName;intnAge;char num[MAX_SIZE] ;};typedef struct tagRecord{Person m_person;}Record;class CTest{public:CTest(void){}~CTest(){}Person* GetData(){Person *p = & m_stReco 阅读全文
posted @ 2013-06-22 19:26 Predator 阅读(1351) 评论(0) 推荐(0) 编辑
摘要: typedef char SWDirectionDataType;/// 买#define SWDirection_D_BuyEnumType '0'/// 卖#define SWDirection_D_SellEnumType '1'void main(){SWDirectionDataType direction = '1';if (direction == SWDirection_D_BuyEnumType){cout > wait;} 阅读全文
posted @ 2013-06-22 19:25 Predator 阅读(345) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std;void main(){map maps;maps["gan"] = 10;maps["quan"] = 100;maps["fu"] = 1000;cout ::iterator tem;for(tem = maps.begin(); tem != maps.end(); ++tem){ cout first second > wait;}////输出///**************************************/ 阅读全文
posted @ 2013-06-22 19:24 Predator 阅读(211) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusingnamespacestd;usingnamespaceboost::gregorian;//返回dtLastDatetime相对于dtCurDatetime日期的第几周intGetOrderWeek(constdate&dtLastDatetime,constdate&dtCurDatetime); constintMAX_SIZE=100*1024*1024; structPerson{ stringstrName; int nAge; charnum[MAX_SIZE];}; typedefstruc 阅读全文
posted @ 2013-06-22 13:57 Predator 阅读(555) 评论(0) 推荐(0) 编辑
摘要: //#include//#include//#include//#include//usingnamespacestd;//usingnamespaceboost::gregorian;////返回dtLastDatetime相对于dtCurDatetime日期的第几周//intGetOrderWeek(constdate&dtLastDatetime,constdate&dtCurDatetime);////constintMAX_SIZE=100*1024;////structPerson//{// stringstrName;// int nAge;// charch[M 阅读全文
posted @ 2013-06-22 13:02 Predator 阅读(228) 评论(0) 推荐(0) 编辑
摘要: //#include//#include//#include//#include//usingnamespacestd;//usingnamespaceboost::gregorian;////返回dtLastDatetime相对于dtCurDatetime日期的第几周//intGetOrderWeek(constdate&dtLastDatetime,constdate&dtCurDatetime);////constintMAX_SIZE=100*1024;////structPerson//{// stringstrName;// int nAge;// charch[M 阅读全文
posted @ 2013-06-22 09:33 Predator 阅读(643) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <boost/date_time.hpp>using namespace std;using namespace boost::gregorian;//返回dtLastDatetime相对于dtCurDatetime日期的第几周int GetOrderWeek(const date &dtLastDatetime, const date &dtCurDatetime);void main(){int order = 100;order += 200;date myCurDatetime = fro 阅读全文
posted @ 2013-06-22 09:31 Predator 阅读(1257) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <boost/date_time.hpp>using namespace std;using namespace boost::gregorian;void main(){date myCurDatetime = from_undelimited_string("20130602122520");int nMonth = myCurDatetime.month();int nDay = myCurDatetime.day();int nYear = myCurDatetime.year();c 阅读全文
posted @ 2013-06-22 09:30 Predator 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 转载C#程序开发中经常遇到的10条实用的代码1 读取操作系统和CLR的版本OperatingSystem os = System.Environment.OSVersion;Console.WriteLine(“Platform: {0}”, os.Platform);Console.WriteLine(“Service Pack: {0}”, os.ServicePack);Console.WriteLine(“Version: {0}”, os.Version);Console.WriteLine(“VersionString: {0}”, os.VersionString);Consol 阅读全文
posted @ 2013-06-22 09:22 Predator 阅读(271) 评论(0) 推荐(0) 编辑