|
-
Oct 9th, 2000, 02:42 AM
#1
I need to know what this little thing does, like by line.
int i = 0;
unsigned int id = 0;
int l = name.length();
while (i < l)
{
unsigned int a = 0;
for (int j = 0; j < 4; j++)
{
a >>= 8;
if (i < l)
a += static_cast<unsigned int>(name[i]) << 24;
i++;
}
id = (id << 1 | id >> 31) + a;
}
return id;
}
Atleast I want to know what >> and << means, static_cast line doesn't tell to me nothing.
I'm translating this to Visual Basic, but no code needed, only what it does. Thanks already.
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
|