Yes Hammer, exactly correct. I cant remember how I got that output from vb, but it is incorrect. Codeplugs output was the correct one. Of course this still wasnt the output I was getting in C++.
...
Type: Posts; User: Mike_01
Yes Hammer, exactly correct. I cant remember how I got that output from vb, but it is incorrect. Codeplugs output was the correct one. Of course this still wasnt the output I was getting in C++.
...
OK, the following code is cut and pasted together from my larger project so there might be a few declarations or includes that dont need to be here.
#include <iostream>
#include <string>...
T1 and TempCard are both int's. T1 = 0 before both loops. All var's are the same before the loops.
Ok, this is odd.
When I check the values of TempCard using this method:
for (unsigned int n = 0; n < 72; n++){
T1 = (T1 + TempCard[TempCard[n] % 17] + TempCard[n]) & 0xFF;
TempCard[n] = T1;...
I have, and they are. Im about to go thru this loop on paper to see if I can figure out how its screwing up that way. Should take a while, LOL. I've also tried breaking it down to one operation...
And here are the values before and after the loops if this helps:
Before:
TempCard[] = {2, 139, 23, 255, 0, 2, 139, 23, 255, 0, 2, 139, 23, 255, 0, 2, 139, 23, 255, 0, 2, 139, 23, 255, 0, 2,...
Hello, im trying to port some vb code into C++, and ive run into a snag.
I took the following code in vb:
For Index = 0 To 71
T1 = (T1 + TempCard(TempCard(Index) Mod 17) +...