avoiding big numbers and stack overflows during file operations

Okay, so, I am writing a program which has to read from sector X to sector Y in a file. The issue is that, what if the value of either X or Y is huge and it causes an overflow? I have a silly idea, which involves using 16 unsigned chars each to do the math, but that's silly and involves inputting the range in hexadecimal. I'm probably over thinking this but I don't know what to do.
Last edited on
Just use 64 bit values for x and y:
1
2
#include <cstdint>
uint64_t x, y;

Topic archived. No new replies allowed.