Hello, I have a small program that takes in a number and performs some operations to that number, then returns the value. The relevant code is here:
m_ActEdit is an entry in an edit box. I'm using atoi to convert it to an int.
After it has been converted to an int it goes through that series of operations to output a number.
Here is the issue. I have that compiled using Visual Studio 6 in XP and using Visual Studio 2005 in Vista.
I used the same input number: 4102182706
The results that I got were different when I ran that same number in both programs:
VS6/XP = 177
VS2005/Vista = 1102
I'm not sure as to why this is happening...Has there been any changes to the way some of the code works (like atoi)? I don't think that the OS has anything to do with it.
Code:
CString codeStr;
unsigned __int64 code = (((unsigned __int64)atoi(m_ActEdit) * 9999) + 5) % 1234;
After it has been converted to an int it goes through that series of operations to output a number.
Here is the issue. I have that compiled using Visual Studio 6 in XP and using Visual Studio 2005 in Vista.
I used the same input number: 4102182706
The results that I got were different when I ran that same number in both programs:
VS6/XP = 177
VS2005/Vista = 1102
I'm not sure as to why this is happening...Has there been any changes to the way some of the code works (like atoi)? I don't think that the OS has anything to do with it.
Comment