Re: char**
On Sat, 30 Aug 2008 03:32:04 -0700 (PDT), zzt256@xxxxxxxxx wrote:
On Aug 30, 6:01 am, MN <mazouz.nezh...@xxxxxxxxx> wrote:
I have a question :
How to understand the mean of char** type ?
Well, it's a pointer to a pointer to a char. So if char * can
represent a string, char ** points to multiple strings. For example,
A variable of type char* cannot represent a string. It can however
point to a char which is a character in a string (usually the first
character).
to define an array of strings one would usually:
char *arr[] = { "one", "two", "three" };
While this code is correct, arr does not have type char**. It has
type array of three pointers to char which is expressed syntactically
as char *[3].
--
Remove del for email
.
Relevant Pages
- Re: split a string
... But this reads a string into a single char ... Check fgetsfrom the Standard C Library as a way to get string input ... pointer to a pointer to a char. ... To handle arrays remotely. ... (alt.comp.lang.learn.c-cpp) - Re: copy a string into a 2d array of chars
... This split function should allocate a 2D array of chars ... >focus the program the string is not actually split. ... later) is an array of char containing the original contents of the ... The i-th pointer will contain the starting address of the ... (comp.lang.c) - Re: problem with function
... > If you intended copying the string, you need to use the strcpy function. ... I suggest researching hungarian notation for variable names. ... Isn't 'psz' a pointer a an array of characters containing a string? ... pointer to char. ... (alt.comp.lang.learn.c-cpp) - Re: How to mid string on a binary string?
... > return a pointer from that postion to the end of the binary stirng. ... I don't know how I can do a char ... just what you mean by "binary string". ... including the first null character". ... (comp.lang.c) - Re: Help with C->C# Port
... char is a character. ... you would use a string in C# ... - **char is a pointer to a pointer of char. ... (microsoft.public.dotnet.languages.csharp) |
|