- May
- 13,121
- 180
If I do this,
Sscanf(psz, L" %u-%u-%u%*[ ,]%u:%u:%u%*[ ,]%c",
&st.wYear, &st.wMonth, &st.wDay, &st.wHour, &st.wMinute, &st.wSecond, &c)
with the string "2008-11-19 00:00:00 u", Sscanf (correctly?) returns 7 (assignments made) and c is assigned.
But if I do
Sscanf(psz, L" %u-%u-%u%*[ ,]%c",
&st.wYear, &st.wMonth, &st.wDay, &c)
with the string "2008-11-19 u"
Sscanf returns 3 (where 4 is expected?) and c is not assigned.
What's going on?
Sscanf(psz, L" %u-%u-%u%*[ ,]%u:%u:%u%*[ ,]%c",
&st.wYear, &st.wMonth, &st.wDay, &st.wHour, &st.wMinute, &st.wSecond, &c)
with the string "2008-11-19 00:00:00 u", Sscanf (correctly?) returns 7 (assignments made) and c is assigned.
But if I do
Sscanf(psz, L" %u-%u-%u%*[ ,]%c",
&st.wYear, &st.wMonth, &st.wDay, &c)
with the string "2008-11-19 u"
Sscanf returns 3 (where 4 is expected?) and c is not assigned.
What's going on?