int64 question

P

Pat

Hi,

I want to write a int64 data into a file using fprintf(). In the fprintf
argument, which one (%d or %u or other) should be used?

Thanks.

Pat
 
B

Bill Seurer

Pat said:
I want to write a int64 data into a file using fprintf(). In the fprintf
argument, which one (%d or %u or other) should be used?

There is no "int64" in C++ so you are using some language extension.
Read the manual for your compiler to find out.
 
K

Karthik

Pat said:
Hi,

I want to write a int64 data into a file using fprintf(). In the fprintf
argument, which one (%d or %u or other) should be used?
Brief Answer - it depends.
Detailed -
%d - For integers.
%u - For unsigned ints.
%ld - For long.

Having said that, you choose the one , relevant to your application.
 

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,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top