class CConfFile
{
public:
CConfFile(const std::string &FileName);
~CConfFile();
...
std::string GetString(const std::string &Section, const std::string &Key);
void GetString(const std::string &Section, const std::string &Key, char *Buffer, unsigned int BufferSize);
...
}
string CConfFile::GetString(const string &Section, const string &Key)
{
return GetKeyValue(Section, Key);
}
void GetString(const string &Section, const string &Key, char *Buffer, unsigned int BufferSize)
{
string Str = GetString(Section, Key); // *** ERROR ***
strncpy(Buffer, Str.c_str(), Str.size());
}
왜 두 번째 기능에서 too few arguments to function ‘void GetString(const std::string&, const std::string&, char*, unsigned int)'
오류가 발생합니까?왜이 함수 오버로딩이 작동하지 않습니까?
덕분에
OMG !!! 나는 이것을 볼 수있는 기회가 없었다 :) 고마워. – jackhab