Subj : Re: accessing a subset of a subset To : borland.public.cpp.borlandcpp From : "Ed Mulroy [TeamB]" Date : Mon Oct 13 2003 04:30 pm > OK. Let’s say I have 20 character arrays. I put their > pointers into an array of pointers. > lineptr[0] = '\0'; When you ask something like this, show the declaration. I assume that you have declarations which are something like this: char *lineptr[20]; char line11[] = "123456789abcdefghijklmnopqrstuvwxyz"; and your message includes the following executable line: lineptr[11] = line11; That sets the data contained by lineptr[11] to be the address of line11. That is the same as the address of the first character in lineptr11's array since in C and C++ array addresses are the address of the first character in the array. > Next, I want to refer to a particular character array, and > a particular subset within that character array. Example, > sub 7 of lineptr[11]. What is 'sub 7'? Do you mean the character line11[7] (which the above sets to the character '7') ? .. Ed > Rob C wrote in message > news:3f8afa62$1@newsgroups.borland.com... > > OK. Let’s say I have 20 character arrays. I put their pointers > into an array of pointers. > lineptr[0] = '\0'; > lineptr[1] = line1; > lineptr[2] = line2; > lineptr[3] = line3; > lineptr[4] = line4; > lineptr[5] = line5; > lineptr[6] = line6; > lineptr[7] = line7; > lineptr[8] = line8; > lineptr[9] = line9; > lineptr[10] = line10; > lineptr[11] = line11; > lineptr[12] = line12; > lineptr[13] = line13; > lineptr[14] = line14; > lineptr[15] = line15; > lineptr[16] = line16; > lineptr[17] = line17; > lineptr[18] = line18; > lineptr[19] = line19; > lineptr[20] = line20; > Next, I want to refer to a particular character array, and > a particular subset within that character array. Example, > sub 7 of lineptr[11]. > > This has got me stumped. .