Recommended data type for storing file size in bytes in C language?

45 views Asked by At

I made a function in C that finds folder size recursively and sometimes the number of bytes get very big.

Things work well on 64 bit systems. However, on 32 bit systems, things broke because I used off_t semantically (it is common to use it t9 represent file size). I need to decide for another datatype that can store way larger numbers.

What should I use? A simple Google search says int64_t but want a data type that describes file sizes.

0

There are 0 answers