Martin wrote:
> On 3 July, 12:22, Nobody <nob...@nowhere.com> wrote:
>> On Fri, 03 Jul 2009 02:15:49 -0700, Martin wrote:
>>> I have been trying to construct my own library of commonly used C
>>> functions and have got a bit stuck and wonder if anyone could give me
>>> any pointers?
>>> I have set up a generic read function...
>>> void read_file_float(FILE **fp, float **array, int size, char **argv)
>>
>> Why are you passing a FILE** rather than just a FILE*? And a float**
>> rather than just a float*?
>
> because I understood the way adjust passed copy of pointer was to use
> a pointer to a pointer. I got that from the FAQ, perhaps I
> misunderstood?
>
> http://c-faq.com/ptrs/passptrinit.html
You're not changing the caller's pointer, only the object that the
pointer is pointing to.
S
--
Stephen Sprunk "Stupid people surround themselves with smart
CCIE #3723 people. Smart people surround themselves with
K5SSS smart people who disagree with them." --Isaac Jaffe