Right now I\'m doing
for (char c = \'a\'; c <= \'z\'; c++) { alphabet[c - \'a\'] = c; }
but is there a better way to do it? Similar
Simplicity is a virtue. Use this naturally readable array:
char alphabet[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};