How to output long long or int64?

R

Richard Bos

Betaver said:
Thanks for all the excellent answers.
My complier is gcc 3.4.2 and can't use another one, so I decide output
like this:
printf("%I64d",c);
Is it all right?

Not in C, it isn't. Maybe in Ganuck, but that's off-topic here; ask in
gnu.gcc.help (If I've remembered the name correctly; readily findable,
anyway).

Richard
 
D

Default User

Betaver said:
To Jordan Abel:
It's my mistake.I may wrote "__int64", not "int64"

Looks like you are trying quote messages using Google.

I think you will find the information below of value



Brian
 
J

Joe Wright

Betaver said:
Thanks for all the excellent answers.
My complier is gcc 3.4.2 and can't use another one, so I decide output
like this:
printf("%I64d",c);
Is it all right?
Have you tried..

#include <stdio.h>
long long a;
int main(void)
{
a = 999999999;
a *= 5;
printf("%lld\n", a);
return 0;
}

...a real C program?

With GCC 3.1 (DJGPP) this prints..
4999999995
 
J

jacob navia

Betaver said:
With Dev-C++ 4.9.9.2 Gcc 3.4.2
The printf you are calling is Microsoft printf in CRTDLL.DLL
Apparently you are using the mingw version of gcc without glibc.
Use I64 in that system since it works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,170
Latest member
Andrew1609
Top