我收到以下错误
1>------ Build started: Project: test123, Configuration: Debug Win32 ------
1> test.cpp
1>e:\avinash\test123\test.cpp(25): error C2668: 'XYZ::createKey' : ambiguous call to overloaded function
1> e:\avinash\test123\test.cpp(13): could be 'void *XYZ::createKey(const int64_t)'
1> e:\avinash\test123\test.cpp(7): or 'void *XYZ::createKey(const time_t &)'
1> while trying to match the argument list '(long)'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
以下是源代码,我该如何解决
#include <WinSock2.h>
typedef signed __int64 int64;
typedef int64 int64_t;
namespace XYZ
{
inline void* createKey( const time_t& value ) {
return NULL;
}
inline void* createValue( const time_t& value ) {
return NULL;
}
inline void* createKey(const int64_t value) {
return NULL;
}
inline void* createValue(const int64_t value) {
return NULL;
}
}
int main( int argc, char** argv)
{
XYZ::createKey(10L);
return 0;
}