[cc65] OT: Question about Power C and C128

From: Payton Byrd <kingdurin1yahoo.com>
Date: 2005-07-05 05:57:47
I know this is off topic, but I figured it's the most
likely place for someone to have run across my
scenario.

I am writing a game in Power C for the 128.  I'm
having a problem enumerating a two dimensional char*
array declared like this:

char* _sVerbs =
{
    { "n", "N", "orth" },
    { "s", "S", "outh" },
 /** etc. **/
};

No matter what I do, I can only get the first row of
data which always returns back "n", "N", and "orth". 
I've tried directly indexing the array like this:

_sVerbs[i][0] where i is the row I want.

I've tried indexing the pointer:

*(_sVerbs + (i * sizeof(char*))[0]

I've tried getting a pointer to the inner array:

char** sLine = _sVerbs[i];
s = sLine[0];

No matter what I do I always get back the first row of
the array regardless of the value of i.

Is this a known problem with Power C that I should
avoid, or am I just being completely stupid?

Thanks in advance!


		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Jul 5 05:57:54 2005

This archive was generated by hypermail 2.1.8 : 2005-07-05 05:57:57 CEST