摘要: #include<iostream>usingnamespacestd;classpeople{public: voidSing() { song(); }private: virtualvoidsong()=0;}; classwhite:publicpeople{public: voidsong() { cout<<"WhiteSing"<<endl; } }; classblack:publicpeople{public: voidsong() { cout<<"BlackSing"<<e 阅读全文
posted @ 2013-06-20 21:31 Predator 阅读(193) 评论(0) 推荐(0) 编辑
摘要: #pragmaonceclassIAnimal{public: IAnimal(void); ~IAnimal(void); public: virtualvoidShowMsg()=0;};#include"IAnimal.h" IAnimal::IAnimal(void){} IAnimal::~IAnimal(void){}#pragmaonce#include"people.h"classCManager:publicCPeople{public: CManager(void); ~CManager(void);public: voidShowM 阅读全文
posted @ 2013-06-20 21:12 Predator 阅读(314) 评论(0) 推荐(0) 编辑
摘要: char startDatetimeFir[20] = "20130610151521"; char startDatetimeSec[20] = "20130610143525"; date dtFirst = from_undelimited_string(startDatetimeFir); date dtSecond = from_undelimited_string(startDatetimeSec); if (dtFirst == dtSecond) { cout << "EQ" << endl; 阅读全文
posted @ 2013-06-20 20:47 Predator 阅读(290) 评论(0) 推荐(0) 编辑
摘要: #include <string>#include <cmath>#include <iostream>using namespace std;#include <asio.hpp>class Point{private:int m_nX;int m_nY;public:Point(){this->m_nX = 0;this->m_nY = 0;}Point(int x, int y){this->m_nX = x;this->m_nY = y;}void ShowPoint(){cout << "坐 阅读全文
posted @ 2013-06-20 20:46 Predator 阅读(254) 评论(0) 推荐(0) 编辑
摘要: #include <Windows.h>#include <iostream>#include <boost/timer.hpp>using namespace boost;using namespace std;int main(){timer tm;double sum = 0;for (int i=0; i<1000000000; i++){sum += i;}cout << sum << "OK" << endl;double duration = tm.elapsed();cout &l 阅读全文
posted @ 2013-06-20 20:40 Predator 阅读(752) 评论(0) 推荐(0) 编辑
摘要: char startDatetime[20] = "20130620143525"; date myUndefineDate = from_undelimited_string(startDatetime); cout << to_iso_string(myUndefineDate) << endl; int nYear = myUndefineDate.year(); int nMonth = myUndefineDate.month(); int nDay = myUndefineDate.day(); cout << "年 阅读全文
posted @ 2013-06-20 20:38 Predator 阅读(315) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string>#include "Helper.h"using namespace std;using namespace PerfomanceEstimateService;using namespace std;enum enA{A_1 = 1,A_2 = 2,};enum enB{A_1_ = 1, //如果这样定义A_1 = 1, 则错误提示 A_1;重定义;以前的定义是"枚举数"A_2_ = 2, //如果这样定义A_2 = 1,则错误提示 A_1;重定义;以前的 阅读全文
posted @ 2013-06-20 20:37 Predator 阅读(3430) 评论(0) 推荐(0) 编辑
摘要: #include<string>#include<iostream>usingnamespacestd;structPerson{ string name; int age;}; PersonGetPerson(); intmain(){ Personperson=GetPerson(); cout<<person.name<<""<<person.age<<endl;//输出ganquanfu24 intwait; cin>>wait; return0;} PersonGetPerson( 阅读全文
posted @ 2013-06-20 20:36 Predator 阅读(384) 评论(0) 推荐(0) 编辑
摘要: #pragmaonceclassCA{public: CA(void); CA(intage); ~CA(void);public: voidDisplay(); private: int m_nAge; }; #include"A.h"#include<iostream>usingnamespacestd; CA::CA(void){} CA::CA(intage){ this->m_nAge=age;} CA::~CA(void){} voidCA::Display(){ cout<<"年龄:"<<m_nAg 阅读全文
posted @ 2013-06-20 20:29 Predator 阅读(645) 评论(0) 推荐(0) 编辑