Member 9353776 wrote:
char buffer[50] int offset =3; char Buffer[250]; sprintf_s(&buffer[offset],offset,"%s",Buffer);
I am trying to guess what your code is supposed to do here but this might be closer to what you want:
char buffer[50]
int offset =3;
char Buffer[250];
sprintf_s(&buffer[offset], sizeof(buffer) - offset, "%s", Buffer);
The second parameter of sprintf_s as used here is the maximum allowed length of the output buffer. If the buffer is of size 50 and you want to write starting in element 3 then the obvious size remaining is 'sizeof(buffer) - offset' and not 'offset'. HTH
-- Harvey