|
-
Dec 5th, 2002, 12:04 PM
#1
Thread Starter
Lively Member
Extracting Characters
Help!!!
char FormatID(unsigned char *pString, unsigned char *sStringOfChars)
{
int i;
int nChr;
int nTot;
int nDigit;
nTot = 0;
for (i = 0; i < 9; i++)
{
nChr = character i of pString
if (nChr > 0) nTot += (nChr * (23 - (i + 1)));
}
nDigit = (23 - (nTot % 23));
return character nDigit of sStringOfChars
}
Not done any C++ for years, cannot remember a thing (doh!).
Anyone help with the above two lines :
nChr = ...
return ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|