0
我在我的項目中使用stdio.h文件。如何解決'sprintf'的衝突類型?
當在Xcode編譯的時候,我用
Comipler for C/C++/Objective-C: LLVM GCC 4.2
在編譯時得到衝突的類型 'sprintf的' error.This是在Mac OS中工作正常10.6.8 &的Xcode 3.2.3,但在Mac OS 10.7.4 & Xcode 4.5出現錯誤?請幫幫我?
這是在Mac OS中碼X 10.7.4
__BEGIN_DECLS
int fseeko(FILE *, off_t, int);
off_t ftello(FILE *);
__END_DECLS
#endif /* __DARWIN_C_LEVEL >= 200112L */
#if __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus)
__BEGIN_DECLS
int snprintf(char * __restrict, size_t, const char * __restrict, ...) __printflike(3, 4);
int vfscanf(FILE * __restrict, const char * __restrict, va_list) __scanflike(2, 0);
int vscanf(const char * __restrict, va_list) __scanflike(1, 0);
int vsnprintf(char * __restrict, size_t, const char * __restrict, va_list) __printflike(3, 0);
int vsscanf(const char * __restrict, const char * __restrict, va_list) __scanflike(2, 0);
__END_DECLS
#endif /* __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus) */
你能發佈導致錯誤的代碼嗎? – hmjd