Now I want to calculate the nProductID as following codes:
Int32 nProductID;
Int32 nSourceID=9093962000;
Char* sProductID;
Char* ProductID;
for(i=1;i<=StrLen(sRegName);i++){
n=(UInt16)sRegName[i-1];
nProductID=n*i+nProductID;
}
nProductID=nProductID*nSourceID;
StrIToA(ProductID,nProductID);
StrNCopy(sProductID,ProductID,8);
BUT I cant get the exact result.
Does it because of the overflow?
How to resolve it?
Thanks for any help!!!
Susan
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/