编译失败,输出如下。
有什么想法请..
PStore.cpp
PStore.cpp(169) : error C2220: warning treated as error - no 'object' file generated
PStore.cpp(169) : warning C4091: '' : ignored on left of 'bool' when no variable is declared
PStore.cpp(169) : error C2143: syntax error : missing ';' before 'inline function header'
PStore.cpp(170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
PStore.cpp(170) : error C2556: 'int PStore::getVersion(std::string &)' : overloaded function differs only by return type from 'bool PStore::getVersion(std::string &)'
../include\PStore.h(48) : see declaration of 'PStore::getVersion'
PStore.cpp(170) : error C2371: 'PStore::getVersion' : redefinition; different basic types
../include\PStore.h(48) : see declaration of 'PStore::getVersion'
这是代码片段:
bool PStore::getVersion(std::string& version)
{
AMPI_INFO("[API]");
return getVersionNoLogging(version);
}
bool PStore::getVersionNoLogging(std::string& version)
{
version = AMPI_PStore_VERSION " " __DATE__ " " __TIME__;
return true;
}