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 2010-04-27 12:14:02