java - 2D Array of letter number combination indexes -


i @ loss in creating 2d matrix combination of letters , numbers indexes.

typically array accessed using array[0][1] or array[3][2]. how can achieve looking array using letters array[a][1] or array[d][2]? should use many letters user desires. instance, user wants 10 rows , have array[j][1,2,etc.].

you can convert char index like:

char x = ...; int index = x-'a'; array[index][3] 

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -