摘要:
#pragmaonce #include<iostream>usingnamespacestd; namespaceMyDLL{ //导出类 classMyDLL { public: MyDLL(); ~MyDLL(); intadd(intx,inty);//简单方法 }; extern"C"__declspec(dllexport)voidShowMsg();}#include"MyDLL.h" namespaceMyDLL{ MyDLL::MyDLL() { } MyDLL::~MyDLL() { } extern"C&quo 阅读全文
摘要:
#ifndefAFX_XXXXXX_111111000000000_PEOPLE_H#defineAFX_XXXXXX_111111000000000_PEOPLE_H #include<string>usingnamespacestd;//类的实现 classPeople{ public: string m_Name; //姓名 string m_Number; //学号 stringm_Address; //地址 int m_Age; //年龄 //constintlen=20; enum{len=12}; int m_Datas[len]; staticdouble... 阅读全文
摘要:
void main(){#include <stdlib.h>string score = "98";int res = atoi(score.c_str());cout << res <<endl; int result; cin >> result ;}#include "People.h"#include <sstream>#include <iostream>void main(){int dataInput;cin >> dataInput;stringstre 阅读全文
摘要:
#include <iostream>using namespace std;template<typename Derived>class SegBase{public://流程框架void segment(){for (int i = 0; i < 2; i++){deal(); //流程内的某个核心部件函数}}void deal_default(){cout << "Use SegBase default" << endl;}void deal(){static_cast<Derived*> (this 阅读全文