L
lazy
Hi,
Im trying to define a hashtable thats static(meaning the table is
initialised at compile time itself)
It takes a char and has 2 other ints as values
For eg:
arr[1]={1,2}
arr[20]={0xaabbff,0xabcdef}
so its a 2D array with n rows and 2 columns. I know n, at compile time
itself. but I cant do int arr[n][2] bcos the first index(or rownumber)
is char and not int.Typecasting to a higher type should be ok, but
another problem is the rows are not sequential, for eg in above
example, there are 2 rows, but I would like to use arr[20].
I want to declare a static array for this. Not sure how to do it.
Im trying to define a hashtable thats static(meaning the table is
initialised at compile time itself)
It takes a char and has 2 other ints as values
For eg:
arr[1]={1,2}
arr[20]={0xaabbff,0xabcdef}
so its a 2D array with n rows and 2 columns. I know n, at compile time
itself. but I cant do int arr[n][2] bcos the first index(or rownumber)
is char and not int.Typecasting to a higher type should be ok, but
another problem is the rows are not sequential, for eg in above
example, there are 2 rows, but I would like to use arr[20].
I want to declare a static array for this. Not sure how to do it.