Hallo Daniel,
#include
main()
{
long long i;
i=100;
i*=100;
printf("%lld",i);
return 0;
}
$ ./printf
1
Am Samstag, 24. Januar 2004 um 01:41 schriebst du:
> when I compile the following program:
> #include
> main()
> {
> long long i;
> i=100;
> i*=100;
> pr
Hi,
I ran across a similar problem on OSX. It turned out to be a compiler
bug. The workaround on that platform was to use an explicit cast in
the argument list, i.e. something like:
printf("%Ld",(long long)i);
regards,
Markus
Daniel Jeliński writes:
> when I compile the following program:
>
"ll" is the long long prefix.
Daniel Jeliński wrote:
when I compile the following program:
#include
main()
{
long long i;
i=100;
i*=100;
printf("%Ld",i);
return 0;
}
I get the following:
-727379968
instead of the expected 1
I am using gcc 3.3.1
the same code works nicely on l
In message <[EMAIL PROTECTED]>, =?iso-8859-2?B?RGFuaWVsIEplbGnxc2tp?=
writes:
>I am using gcc 3.3.1
>the same code works nicely on linux machine with gcc 3.3.1
>is any other information necessary?
What happens if you use %lld, which is what the standard specifies for long
long, instead of the L
when I compile the following program:
#include
main()
{
long long i;
i=100;
i*=100;
printf("%Ld",i);
return 0;
}
I get the following:
-727379968
instead of the expected 1
I am using gcc 3.3.1
the same code works nicely on linux machine with gcc 3.3.1
is any other information n
5 matches
Mail list logo