int main()
{
const int SIZE = 4;
char pin[SIZE] = { 1, 2, 3, 4 };
char temp[SIZE+1];
strcpy_s(temp, SIZE+1, pin);
return 0;
}
This code throws "Buffer is too small" exception. However, it starts working if I make temp 14 or more:
char temp[14];
strcpy_s(temp, 14, pin);
^ Works ^
Why does it start working only after 14?