ini.h
来自「股票搜索程序,可自动搜索符合一定条件的股票。这里的条件主要包括前N天的成交量、价」· C头文件 代码 · 共 66 行
H
66 行
// IniFile.h: interface for the CIniReader class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_INIFILE_H__99976B4B_DBA1_4D1E_AA14_CBEB63042FD1__INCLUDED_)
#define AFX_INIFILE_H__99976B4B_DBA1_4D1E_AA14_CBEB63042FD1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxcoll.h>
class CIniReader
{
public:
// method to set INI file name, if not already specified
void setINIFileName(CString strINIFile);
// methods to return the lists of section data and section names
CStringList* getSectionData(CString strSection);
CStringList* getSectionNames();
// check if the section exists in the file
BOOL sectionExists(CString strSection);
// updates the key value, if key already exists, else creates a key-value pair
long setKey(CString strValue, CString strKey, CString strSection);
// give the key value for the specified key of a section
CString getKeyValue(CString strKey,CString strSection);
// default constructor
CIniReader()
{
m_sectionList = new CStringList();
m_sectionDataList = new CStringList();
}
CIniReader(CString strFile)
{
m_strFileName = strFile;
m_sectionList = new CStringList();
m_sectionDataList = new CStringList();
}
~CIniReader()
{
delete m_sectionList;
delete m_sectionDataList;
}
private:
// lists to keep sections and section data
CStringList *m_sectionDataList;
CStringList *m_sectionList;
CString m_strSection;
long m_lRetValue;
// ini file name
CString m_strFileName;
};
#endif // !defined(AFX_INIFILE_H__99976B4B_DBA1_4D1E_AA14_CBEB63042FD1__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?