I want to declare a two-dimensional array with two different data types in C language. First column and row must be character and they are the same and other elements must be integer. Then, I want to set the values of the elements based on the first column and row. For example:
A B C D
A 1 2 3 4
B 4 3 2 1 a[A][D] = 4
C 9 8 7 6
D 6 7 8 9
I cannot use a[0][3] = 4, because A and D are returned values of another function in my program and I don't know what there indeces are in the array a. If I use another array for my first row and search in it to find the index, it takes too much time and it is not good for the performance of my program.
charis actually a numeric type. It can be cast toint