-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathIni.h
37 lines (29 loc) · 1.12 KB
/
Ini.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Ini.h: interface for the CIni class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_INI_H__82D19E50_EEFD_4348_A098_5D16E166B8C5__INCLUDED_)
#define AFX_INI_H__82D19E50_EEFD_4348_A098_5D16E166B8C5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <string>
const char* AppPath(char* path, const char* fName);
class CIni
{
public:
CIni(const char* path);
virtual ~CIni();
void SetPath(const char* path);
const char* GetPath(){return cfgpath;}
int GetInt(const char* sec, const char* key, int def);
int GetStr(const char* sec, const char* key, char* value);
bool SetInt(const char* sec, const char* key, int value);
bool SetStr(const char* sec, const char* key, const char* value);
protected:
char cfgpath[260];
};
int GetIniInt(const char* sec, const char* key, int def);
std::string GetIniStr(const char* sec, const char* key, const char* def);
bool SetIniInt(const char* sec, const char* key, int value);
bool SetIniStr(const char* sec, const char* key, const char* value);
#endif // !defined(AFX_INI_H__82D19E50_EEFD_4348_A098_5D16E166B8C5__INCLUDED_)