I'm trying to convert the digit's 0 to 9 to ASCII using _itoa_s
and I find myself running into stack corruption errors using MSVC2012.
I thought that the ASCII table only occupied one byte per character, but from the looks of things, one byte isn't enough.
Where is my thinking wrong?
for (int digit = 0; digit < 10; digit++)
{
char ch_digit;
_itoa_s(digit, &ch_digit, 1, 10);
}
I thought this simple loop should succeed, however it fails. I'm baffled.