Re: char**



On Aug 30, 2:55 pm, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:
MN said:

I have a question :
How to understand the mean of char** type ?

char is a type - objects of that type are 1 byte in size and can contain as
their value any single member of the execution character set.

char * is a type - objects of that type are sizeof(char *) bytes in size,
and can contain as their value the address of a single char.

char ** is a type - objects of that type are sizeof(char **) bytes in size,
and can contain as their value the address of a single char *.

What is the question behind the question?

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999

the question is :
I have a function which returns an array of chars with 2 dimensions.
The size of array is dynamically changed by malloc.
To return this array I must declare it as an extern in the header file
like this: extern char** array.
if I use extern char* array, I get error.
.



Relevant Pages

  • Re: Window Management
    ... (* prompt is a string resource identifier specifying the string ... PROCEDURE YesNoCancel(prompt: ARRAY OF CHAR; ... VAR INOUT response: ARRAY OF CHAR): BOOLEAN; ...
    (comp.lang.ada)
  • Window Management
    ... (* prompt is a string resource identifier specifying the string ... PROCEDURE YesNoCancel(prompt: ARRAY OF CHAR; ... VAR INOUT response: ARRAY OF CHAR): BOOLEAN; ...
    (comp.lang.ada)
  • Re: Pointer
    ... require in input a pointer char: ... unsafe public static extern int OpenFile; ... What is it pointing to exactly, is it pointing to a "Unicode character" array or is it pointing to a "Single byte character" array or is it pointing to something else? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Pointer
    ... require in input a pointer char: ... unsafe public static extern int OpenFile; ... What is it pointing to exactly, is it pointing to a "Unicode character" array or is it ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Problem with va_ macros and arrays of arrays
    ... > the arrays passed to a ... > specific char, somewhat similar to what the standard function ... that with an array of struct, or possibly a pointer to a dynamic array ... > As I'm still a beginner in C without a copy of the standard I ...
    (comp.lang.c)