Re: How to increment array of pointers to strings



Keith Thompson wrote:

barncat <thebarncat@xxxxxxxxx> writes:
[...]
Thanks. The array is actually a ptr to an array of strings, like:
char *name[] = { "one","two","three" };
which yes, i guess is different than **argv.
sorry, i am just confused trying to learn.
I guess i could make it an
** object like argv and work with it that way.

Given the above declaration, name is a pointer to the first element
of an array of char*, where each char* happens to point to (the
first character of) a string.

It almost seems as though you are saying that
given the above declaration, that (name) is a pointer.

--
pete
.



Relevant Pages

  • on topic to clc [Was: Banks and economy]
    ... pointer type - which I think is correct for "arrays", ... Since, as a formal parameter, char cptr[]; ... pointer to the 'completing' declaration, ...   tentative definition. ...
    (comp.lang.c)
  • Re: fgetc
    ... argv is declared as array of pointer to char. ... it's declared as a pointer to pointer to char. ... "Neither compiler yet handled the general declaration syntax of today or ...
    (comp.lang.c)
  • Re: fgetc
    ... argv is declared as array of pointer to char. ... it's declared as a pointer to pointer to char. ... "Neither compiler yet handled the general declaration syntax of today or ...
    (comp.lang.c)
  • Re: segmentation fault
    ... char s; ... it serves to temporarily replace the declaration ... While fgets returns a null string, ... You shouldn't try to printf a NULL pointer. ...
    (comp.lang.c)
  • Re: Compress captured videoframe
    ... > Now I have got another trouble - declaration of ICCompress. ... It simply means a pointer to something, generally used when a function can optionally use a parameter and/or it ... In the first instance you're trying to send the entire array to the function including it's header, VB is stopping you from doing so ... first element and since all the rest of the array data comes directly after that the API call can happily write to it. ...
    (microsoft.public.vb.winapi.graphics)