B
Bill Cunningham
I have been looking for a function from ANSI C that would start out with
a buffer size of zero initialized and would grow to a certain size. I have
already been able to set aside a 32 byte type using malloc(). Could calloc()
be what I'm looking for? This buffer would be able to grow by a mechanism
that would include using fscanf to find the size of a file in bytes. So my
question is simply is there any functions or ways in c89 to fill a buffer to
a certain size before it's clear? int buffer[] won't work unless it's a
char.
Bill
a buffer size of zero initialized and would grow to a certain size. I have
already been able to set aside a 32 byte type using malloc(). Could calloc()
be what I'm looking for? This buffer would be able to grow by a mechanism
that would include using fscanf to find the size of a file in bytes. So my
question is simply is there any functions or ways in c89 to fill a buffer to
a certain size before it's clear? int buffer[] won't work unless it's a
char.
Bill