how do i map two numbers in C++ ?

i mean :

gcd[23,32]=1
gcd[100,100]=100

how do i do this ???

note: i cannot use a two dimensional array since i need to store values upto 10000 & i cannot create such a huge array(gcd[10000][10000])
i.e., gcd[10000,10000]=10000;

any suggestions ??