C++ Xcode 4.5(iOS 6)获取冲突类型错误?

C++ Xcode 4.5(iOS 6)获取冲突类型错误?,c++,xcode4.5,C++,Xcode4.5,我正在文件inet\u ntop.h中使用此代码。这里我声明了constchar*inet\u ntop #ifndef HAVE_INET_NTOP #if defined(__cplusplus) extern "C" { #endif const char *inet_ntop(int af, const void *src, char *dst, size_t size); #if defined(__cplusplus) } #endif #endif /* HAVE_INET

我正在文件
inet\u ntop.h
中使用此代码。这里我声明了
constchar*inet\u ntop

#ifndef HAVE_INET_NTOP
#if defined(__cplusplus)
extern "C" {
#endif
    const char *inet_ntop(int af, const void *src, char *dst, size_t size);
#if defined(__cplusplus)
}
#endif
#endif /* HAVE_INET_NTOP */
在编译时,我得到一个“inet\u ntop的类型冲突”错误


这在Xcode 3.2.3中起作用,但在Xcode 4.5中的同一应用程序中使用该代码会导致此冲突错误。如何解决此问题?

从何处获取冲突类型?示例?您是否包括
上一个参数的类型错误。“inet_ntop”的冲突类型在上述代码中出现错误。当我更改Xcode编译器C/C++:LLVM GCC 4.2时,我在stdio.hHi alexwlchan中遇到了“sprintf”的冲突类型,我期待问题的答案而不是更正。。。试着帮助某人