M
McNitt
Guest
try this
const int TEXT_BUFFER_SIZE = 400;
TCHAR szBuffer[TEXT_BUFFER_SIZE];
szBuffer[0] = '0';
szBuffer[1] = '\0';
szBuffer[2] = '2';
szBuffer[3] = '3';
szBuffer[4] = '\0';
szBuffer[5] = '\0';
double d;
_sntscanf_s(szBuffer,_countof(szBuffer), _T("%lf"), &d);
I would expect d to be 0 but in VS2015 it will return 23.
Continue reading...
const int TEXT_BUFFER_SIZE = 400;
TCHAR szBuffer[TEXT_BUFFER_SIZE];
szBuffer[0] = '0';
szBuffer[1] = '\0';
szBuffer[2] = '2';
szBuffer[3] = '3';
szBuffer[4] = '\0';
szBuffer[5] = '\0';
double d;
_sntscanf_s(szBuffer,_countof(szBuffer), _T("%lf"), &d);
I would expect d to be 0 but in VS2015 it will return 23.
Continue reading...