⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 president.cpp

📁 在本实例中,实现了单体模式,工厂模式,门面模式以及STL编程
💻 CPP
字号:
#pragma once
#include "stdafx.h"
#include "president.h"
president* president::pre=NULL;
president::president(){
	   com_clg_pre *computer=NULL;
	   for_clg_pre *foreign=NULL;
	   chi_clg_pre *chinese=NULL;
   }
   void president::tongzhi(CButton cb[],const vector<CString> &id)
   {   int i=0;
       	btn=cb;
        testID=id;
       CString sid;
	   for(itr=testID.begin();itr<testID.end();itr++)
	   { 
	     sid=*itr;
		 if(sid>"2005100"&&sid<"2005200")
		 {   
			 ::Sleep(1000);
			 computer=com_clg_pre::createpre();//找到计算机学院的院长
			 btn[i].SetWindowText(computer->zhaodao(sid)->baodao()+"到");
		 }
		if(sid>"2005200"&&sid<"2005300")
		{    
			 ::Sleep(1000);
			 foreign=for_clg_pre::createpre();//找到外语学院的院长
			 btn[i].SetWindowText(foreign->zhaodao(sid)->baodao()+"到");
		 }
		 if(sid>"2005300"&&sid<"2005400")
		{    
			 ::Sleep(1000);
			 chinese=chi_clg_pre::createpre();//找到中文学院的院长
			 btn[i].SetWindowText(chinese->zhaodao(sid)->baodao()+"到");
		 }
		 i++;
	   }
	   testID.rbegin();
   }
  president* president::create()
   {
     if(pre==NULL)
   {
      pre=new president();
   }
   return pre;
   }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -