multi dimensional array

  • Thread starter garagerules.fsnet.co.uk
  • Start date
G

garagerules.fsnet.co.uk

How can i create a 2 dimensional array of "strings" ? I have tried :
char *keys[][] ;
no joy
Thanks for any help
matt
 
M

Morris Dovey

garagerules.fsnet.co.uk said:
How can i create a 2 dimensional array of "strings" ?

Matt

You might find it easier to work with a 2-dimensional array of
pointers to strings...
 
S

SuperCoder2036

garagerules.fsnet.co.uk said:
How can i create a 2 dimensional array of "strings" ? I have tried :
char *keys[][] ;
no joy
Thanks for any help
matt

I having been keeping up with the latest C standard so there may be a
better way to do this now...but to create a multi-dimensional array
you simply:

char array[10][10];

And keep adding dimensions as you need them. I can't remember what,
if any, limit there is on the dimensions but I have always used the
rule of thumb that if you can't draw it then you can't use it. This
means that at most you can have a four dimensional array (x,y,z, and
time).

Hope that helps...

Marty
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top