M
Marja Ribbers-de Vroed
I'm trying to understand a C++ function that has been given to me. Among other things it has the following code fragment in it:
lstrResultStr = "";
for (lnIndex = lnSignature; lnIndex > 0; lnIndex--)
{
sprintf(lstrBuf, "%02X", lstrSignature[lnIndex - 1]);
lstrResultStr += lstrBuf;
}
I think this means that lstrResultStr becomes the reverse of lstrSignature, but I don't understand what's happening on the line with:
sprintf(lstrBuf, "%02X", lstrSignature[lnIndex - 1]);
Can someone please explain what this means?
Thanks in advance.
Regards, Marja
lstrResultStr = "";
for (lnIndex = lnSignature; lnIndex > 0; lnIndex--)
{
sprintf(lstrBuf, "%02X", lstrSignature[lnIndex - 1]);
lstrResultStr += lstrBuf;
}
I think this means that lstrResultStr becomes the reverse of lstrSignature, but I don't understand what's happening on the line with:
sprintf(lstrBuf, "%02X", lstrSignature[lnIndex - 1]);
Can someone please explain what this means?
Thanks in advance.
Regards, Marja