CompuServe Messages

#switch()

    16-Dec-91 15:06:03
Sb: #switch()
Fm: Rob Salmon 71420,471
To: all
I'm having trouble using argv[1] as the controlling expression in switch(). Assume the command line entry is "program ee". Code as follows: #include <stdio.h> #include <string.h> main(argc, argv) int argc char *argv[] { switch(*argv[1]) { case 'ee': etc……. Switch() seems only to see "e", not "ee". Is the single character a limitation of switch() or am I describing argv[1] wrong? Thanks for any help.