|
01: //---------------------------------------------------------------------------
02:
03: #ifndef CommonFunctionH
04: #define CommonFunctionH
05:
06: //---------------------------------------------------------------------------
07: #endif
08
09
10: class IniFile
11: {
12: private:
13: int Host; // 서버주소
14: public:
15: int getHost(String execpath);
16: };
//---------------------------------------------------------------------------
이하는 Cpp파일입니다.
#pragma hdrstop
#include "CommonFunction.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
int IniFile::getHost(String execpath)
{
TIniFile *IniFile = new TIniFile(execpath);
Host = IniFile->ReadString("LoginSection", "Host", "127.0.0.1");
delete IniFile;
return 0;
}
이렇게 하면 아래와같은 메시지가뜹니다.
Build
[C++ Error] CommonFunction.h(15): E2293 ) expected
[C++ Error] CommonFunction.cpp(13): E2147 'String' cannot start a parameter declaration
[C++ Error] CommonFunction.cpp(14): E2316 'IniFile::getHost(int)' is not a member of 'IniFile'
[C++ Error] CommonFunction.cpp(16): E2223 Too many decimal points
[C++ Error] CommonFunction.cpp(16): E2223 Too many decimal points
왜이렇게 뜨는겁니까?
|