E
Evangelista Sami
hello
i have a program which manipulates ints which have their value in a
limited range, for instance, [-100..+100].
in a hash table i store these values. as this hash table can grow very
large, i whish to store this ints in a minimal number of characters
(1 for the previous range). so for each range of the program i create
an appropriate structure. for instance,
typedef struct
{
char c1;
char c2;
} __2chars;
if the int can have between 256 and 65536 values.
my problem is that i don't know hot to pass from an int to a __2chars
without making a big function.
any idea?
Sami Evangelista
i have a program which manipulates ints which have their value in a
limited range, for instance, [-100..+100].
in a hash table i store these values. as this hash table can grow very
large, i whish to store this ints in a minimal number of characters
(1 for the previous range). so for each range of the program i create
an appropriate structure. for instance,
typedef struct
{
char c1;
char c2;
} __2chars;
if the int can have between 256 and 65536 values.
my problem is that i don't know hot to pass from an int to a __2chars
without making a big function.
any idea?
Sami Evangelista