View Single Post
Old 02-07-07, 01:02 PM   #3
Imbroglio's Avatar
Join Date: Mar 2004
Posts: 1,271
Default Re: String Array in C

exactly like rhink stated.

"strings" are already an array terminated by null characters

an array of strings:
0: [a][p][p][l][e][\0]
1: [o][r][a][n][g][e][\0]

so if you wanted to get to the 'n' in orange, the location would be [1][3], and that is printed as a char.

i don't know if this helps, if your question is more advanced i could probably answer it if you ask the question.

are you looking to create an array of strings? like a matrix array of char? looking at your question again, i'm not quite sure what you're asking.

HT: 360 -- Sony60A3000 -- Onkyo SR605 --> Polk cs2, monitor 60s and monitor 40s w/ Bic F12 sub -- PS3
XBL:Mr X3r0 -- PSN:Mr_X3r0

Rig- Asus P6X58D Premium - intel i7 920 @3.6 - EVGA GTX570 - Corsair HX1000 - Prolimatech Mega Shadow - WD640 - COOLER MASTER ATCS 840 - OCZ Gold 6GB DDR3 1600*

Imbroglio is offline   Reply With Quote