0
char [][] ALPHA_LIST = { 
    {'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'}
};

I'm using this like a parallel array to produce a simple encryption for a school project. I found out that every character is in the first row of the array, making it simple array instead of a 2D. Can anyone tell me how my definition is failing to communicate the separation of the two halves of the alphabet?

1 Answers1

0

Can anyone tell me how my definition is failing to communicate the separation of the two halves of the alphabet?

The answer is no. Nobody can tell you that.

The declaration does communicate that the alphabet consists of two parts. There is nothing wrong with it.

The actual problem is likely to be somewhere else. The most likely explanation is a bug / design flaw in some other part of your code is causing the program to behave in a way that makes you think that all characters are in the first row.

It is also possible that your methodology for editing / compiling / running is flawed, and as a result you are not running the code that you think you are.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216