for_clg_pre.h
来自「在本实例中,实现了单体模式,工厂模式,门面模式以及STL编程」· C头文件 代码 · 共 49 行
H
49 行
#pragma once
#ifndef FOR_CLG_PRE_H
#define FOR_CLG_PRE_H
#include "clg_pre.h"
#include "student.h"
#include"for_stu1.h"
#include<vector>
#include"string"
#include"iostream"
using namespace std;
class for_clg_pre:public clg_pre
{
public:
vector<CString> v_Student;
vector<CString>::iterator it;
static for_clg_pre *for_pre;
for_clg_pre()
{
this->name="wangli";
v_Student.push_back("2005201");
v_Student.push_back("2005202");
v_Student.push_back("2005203");
}
student* zhaodao(CString strid)
{
v_Student.rbegin();
for(it=v_Student.begin();it<v_Student.end();it++)
{
if(strid==*it)
{
return new for_stu(strid);
}
}
return NULL;
}
static for_clg_pre* createpre()
{
if(for_pre==NULL)
{
for_pre=new for_clg_pre();
}
return for_pre;
}
};
//for_clg_pre *for_clg_pre::for_pre=NULL;
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?