H
hurry
hi,
I am writing a c program in VC++ 6.
I have 2 files with 3 functions.
file-1 having two functions "a" and "c"
file-2 having a single function "b"
with function "a" as main() , "a" calls function "b" in file-2 which,
in turn calling function "c" in file-1.
function "c" and "b" are declared to return __int64. function "c"
returns it correctly but when it is assigned, it becomes a __int32 bit
number ( assigned to a __int64 var).
and interestingly, when i copy and paste the function "c" from file-2
to file 1, the program behaves as expected.
the code as is given below.
when "c" returns value to "b" it becomes __int32 format.
9007199237963776 becomes -16777216
file-1:
#include<stdio.h>
__int64 a();
__int64 b();
void main()
{
__int64 x;
x = b();
}
__int64 c()
{
__int64 y;
y = 9007199237963776;
return y;
}
file-2:
__int64 b()
{
__int64 z;
z = c();
return z;
}
I am writing a c program in VC++ 6.
I have 2 files with 3 functions.
file-1 having two functions "a" and "c"
file-2 having a single function "b"
with function "a" as main() , "a" calls function "b" in file-2 which,
in turn calling function "c" in file-1.
function "c" and "b" are declared to return __int64. function "c"
returns it correctly but when it is assigned, it becomes a __int32 bit
number ( assigned to a __int64 var).
and interestingly, when i copy and paste the function "c" from file-2
to file 1, the program behaves as expected.
the code as is given below.
when "c" returns value to "b" it becomes __int32 format.
9007199237963776 becomes -16777216
file-1:
#include<stdio.h>
__int64 a();
__int64 b();
void main()
{
__int64 x;
x = b();
}
__int64 c()
{
__int64 y;
y = 9007199237963776;
return y;
}
file-2:
__int64 b()
{
__int64 z;
z = c();
return z;
}