truncation? of an integer

I'm building a hash table class to store acsii values of integers in an array of a set size.

the problem I have is I would like to take a large value, say 34522 and take only the last two digits making it only to be 22, I heard this referred to as truncating the number but all examples found so far are removing the decimal places by simply casting float to int is there a way to specify from where to read the number.

any help is appreciated
int trunc_val = value % 100; // 34522 => 22 % is the modulo operator
that works brilliant.

thank you for your response
Topic archived. No new replies allowed.