The question i have has to do with my next project. Its not mission critical but it is something that i am not sure of in c.<br>
typedef char * array[100]<br>
typedef array * array_ptr<br>
<br>
void function(void)<br>
{<br>
array_ptr something;<br>
}<br>
<br>
something is a pointer to an array of pointers of type char. I know that the compiler will allocate? space for the first pointer but does it allocate space for the other 100 ? Would i have to go in and malloc space for each individual pointer? i wouldn't be putting any information in the pointers just copying existing addresses into them. its to becuase the sort our teacher wants us to use i based upon implimentation in an array. <br>
<br>
thanks for any help<br>
<br>
tom moses <br>
<br>
typedef char * array[100]<br>
typedef array * array_ptr<br>
<br>
void function(void)<br>
{<br>
array_ptr something;<br>
}<br>
<br>
something is a pointer to an array of pointers of type char. I know that the compiler will allocate? space for the first pointer but does it allocate space for the other 100 ? Would i have to go in and malloc space for each individual pointer? i wouldn't be putting any information in the pointers just copying existing addresses into them. its to becuase the sort our teacher wants us to use i based upon implimentation in an array. <br>
<br>
thanks for any help<br>
<br>
tom moses <br>
<br>