📄 input.h
字号:
// Input.h: interface for the Input class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_INPUT_H__849DA69B_342F_4D9C_9A09_5598D04C206D__INCLUDED_)
#define AFX_INPUT_H__849DA69B_342F_4D9C_9A09_5598D04C206D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CInputItem
{
public:
CInputItem () { city = phone = 0;}
unsigned int city;
unsigned int phone;
};
typedef CTypedPtrList<CPtrList, CInputItem*> CInputList;
class Input
{
public:
void LoadFromFile(CString path = "", int fileformat = 1);
int GetSize() { return m_input.GetCount();}
void Add(unsigned int lcode,unsigned int phone)
{
CInputItem *p = new CInputItem;
p->city = lcode;
p->phone = phone;
m_input.AddTail(p);
}
CInputItem * At(int index )
{
POSITION p = m_input.FindIndex(index);
if ( p != NULL )
{
return m_input.GetAt(p);
}
else
{
return NULL;
}
}
void Del(int index)
{
POSITION p = m_input.FindIndex(index);
if ( p!= NULL )
{
CInputItem *d = m_input.GetAt(p);
m_input.RemoveAt ( p );
delete d;
}
}
void RemoveAll();
Input();
virtual ~Input();
int m_fileformat;
CInputList m_input;
};
#endif // !defined(AFX_INPUT_H__849DA69B_342F_4D9C_9A09_5598D04C206D__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -