"Hildinger, Robert" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Greg Lutz" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > Gregg's original code: static const char threeChars[] = {"123"}; > Code from your reply: static const char threeChars[] = "123"; > > Gregg's code may not be "perfect" C syntax, but it generates the same exact > code. The format of Gregg's definition for threeChars[] is obviously NOT the > essential problem.
IT IS!!! I changed it to 'static const char *threeChars = "123";' and it works. The way I defined it initially DEFINITELY whacks out GCC compiler!!! My original definition is definitely wrong. It is defined as a 1 dimensional array but is assigned a 2 dimensional array which has only 1 element. The compiler never should have allowed it and it DEFINITELY generates bad code for GCC (apparantly CodeWarrior can handle it). -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
