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

📄 staff.cpp

📁 对职工的档案进行管理。包括查找 修改
💻 CPP
字号:
// Staff.cpp: implementation of the CStaff class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "SEWORK.h"
#include "Staff.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CStaff::CStaff()
{
	m_working=false;
}

CStaff::CStaff(CString data)//已读入的字符串为构造函数
{
	int nLength=data.GetLength();//得到字符串长度
	char *buf=new char[nLength+1];
	int j=0;
	char *buf1=new char[nLength+1];
	strcpy(buf,data);
	char *p=buf;
	for(int i=0;i<(nLength+1);i++)
	{
		if(buf[i]==0x20)//等于空格
		{
			buf[i]=0x00;
			//得到一个空格,将两串分开
			m_staff_name.Format(p);
			for(i++,j=0;i<(nLength+1);i++,j++)
			{
				buf1[j]=buf[i];
			}
			m_staff_num.Format(buf1);
			m_working=false;
			delete buf;
			delete buf1;
			return ;
		}
	}
	delete buf;
	delete buf1;
}

CStaff::~CStaff()
{

}

⌨️ 快捷键说明

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