Daniel Rogers

Pointer problems

Discussion created by Daniel Rogers on Nov 27, 2006
Latest reply on Nov 29, 2006 by CompilerGuru
I have used the ICC compiler in the past and are changing my code over into CW.
One line I are haveing trouble with it is one I use all the time.
I have a string decleared
#define S_TABLANE      "LANE\0"
#define S_TABOUTLET    "OUTLET\0"
#define S_TABSIZE      "SIZE\0"
#define S_TABAVGSIZE   "PACKS\0"
I then have an array that points to each of these strings.
in my old code I accessed this by doing this
That would display the required string this on longer is the case. The screen displays rubish and it is in a never ending loop. Never finds the end of the string.
To get round it I did a switch case statement which works
   switch (cTab) {
     case 0:
     case 1:
     case 2:
     case 3:
why does CW not like my pointer array.