By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,254 Members | 2,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,254 IT Pros & Developers. It's quick & easy.

problem in sprintf() function

P: 1
imsc_int32_t imsc_wsprintf(
OUT imsc_wchar_t *s,
IN imsc_wchar_t *format,
...)
{
va_list ap;
imsc_int32_t dNumBytes;
va_start(ap, format);
dNumBytes = swprintf(s,format, ap);
va_end(ap);
return dNumBytes;
}



imsc_int32_t imsc_sprintf(
OUT imsc_char_t *s,
IN imsc_char_t *format,
...)
{
va_list ap;
imsc_int32_t dNumBytes;
va_start(ap, format);
dNumBytes = sprintf(s,format, ap);
va_end(ap);
return dNumBytes;
}
c:\port\strings\source\src\imsc_strings.c(135) : warning C4047: 'function' : 'size_t' differs in levels of indirection from 'const imsc_char_t *'
c:\port\strings\source\src\imsc_strings.c(135) : warning C4024: 'sprintf_s' : different types for formal and actual parameter 2
c:\port\strings\source\src\imsc_strings.c(520) : warning C4047: 'function' : 'size_t' differs in levels of indirection from 'imsc_wchar_t *'
c:\port\strings\source\src\imsc_strings.c(520) : warning C4024: 'swprintf' : different types for formal and actual parameter 2
c:\port\strings\source\src\imsc_strings.c(520) : warning C4133: 'function' : incompatible types - from 'va_list' to 'const wchar_t *'
Jun 13 '07 #1
Share this Question
Share on Google+
1 Reply


10K+
P: 13,264
imsc_int32_t imsc_wsprintf(
OUT imsc_wchar_t *s,
IN imsc_wchar_t *format,
...)
{
va_list ap;
imsc_int32_t dNumBytes;
va_start(ap, format);
dNumBytes = swprintf(s,format, ap);
va_end(ap);
return dNumBytes;
}



imsc_int32_t imsc_sprintf(
OUT imsc_char_t *s,
IN imsc_char_t *format,
...)
{
va_list ap;
imsc_int32_t dNumBytes;
va_start(ap, format);
dNumBytes = sprintf(s,format, ap);
va_end(ap);
return dNumBytes;
}
c:\port\strings\source\src\imsc_strings.c(135) : warning C4047: 'function' : 'size_t' differs in levels of indirection from 'const imsc_char_t *'
c:\port\strings\source\src\imsc_strings.c(135) : warning C4024: 'sprintf_s' : different types for formal and actual parameter 2
c:\port\strings\source\src\imsc_strings.c(520) : warning C4047: 'function' : 'size_t' differs in levels of indirection from 'imsc_wchar_t *'
c:\port\strings\source\src\imsc_strings.c(520) : warning C4024: 'swprintf' : different types for formal and actual parameter 2
c:\port\strings\source\src\imsc_strings.c(520) : warning C4133: 'function' : incompatible types - from 'va_list' to 'const wchar_t *'
Hi and welcome to TSDN. I'll move this to the C forum.
Jun 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.