摘要:
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 << "年 阅读全文
摘要:
#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;重定义;以前的 阅读全文
摘要:
#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( 阅读全文
摘要:
#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 阅读全文