Home » U++ TheIDE » U++ TheIDE: Packages » vsprintf() doesn't support "%I64u" format in Win32 platform?
vsprintf() doesn't support "%I64u" format in Win32 platform? [message #14404] |
Mon, 25 February 2008 16:03 |
HenryXin
Messages: 10 Registered: February 2008
|
Promising Member |
|
|
I log the 64bit data as following format:
SysPrintf("[%I64u,%I64u,%I64u,%s]\n", 0x12345, 0xabcdef, 0x0000, "Starting");
call this function.
SysPrintf(const char *format, ...)
{
va_list ap;
va_start(ap, format);
vsprintf(internal_buffer, format, ap);
va_end(ap);
//console_window.DisplayLine(internal_buffer);
}
But the string I get is wrong..
Call
SysPrintf("[%x,%x,%x,%s]\n", 0x12345, 0xabcdef, 0x0000, "Starting");
the result is OK.
Does stdlib not support "%I64u" format?
Best Regards
Henry
|
|
|
Re: vsprintf() doesn't support "%I64u" format in Win32 platform? [message #14472 is a reply to message #14404] |
Wed, 27 February 2008 06:04 |
HenryXin
Messages: 10 Registered: February 2008
|
Promising Member |
|
|
Append another code:
#include "stdio.h"
int main(int argc, const char *argv[])
{
printf("%s\n", "Heee");
printf("%Lu, %s\n", (unsigned long long)1234567890, "Heee");
printf("%Lu,%Lu,%Lu,%s\n", (unsigned long long)12345, (unsigned long long)9871111, (unsigned long long)0x0000, "Starting");
return 0;
}
the result:
Heee
1234567890, (null)
12345,0,9871111,(null)
<--- Finished in (0:00.03), exitcode: 0 --->
|
|
|
Goto Forum:
Current Time: Tue Sep 10 12:20:13 CEST 2024
Total time taken to generate the page: 0.02127 seconds
|