Re: fseek and open_memstream
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Wed, 31 Jan 2007 17:14:49 +0000 (UTC)
In article <epqett$1k9e$1@xxxxxxxxxxxxxxxxx>,
Dmitry Belous <dmitry_belous@xxxxx> wrote:
Why when I uncomment fseek line buf become empty?
#define _GNU_SOURCE
#include <stdio.h>
int main() {
char *buf = 0;
int size = 0;
FILE* f = open_memstream(&buf, &size);
What is open_memstream() ? It is not part of C89, and I've never
heard of it being part of C99.
fwrite("test", 1, 4, f);
// fseek(f, 0, SEEK_SET);
fclose(f);
fprintf(stderr, buf);
}
You appear to be using an implementation library function. You
will need to ask in a location that specializes in your implementation.
--
"It is important to remember that when it comes to law, computers
never make copies, only human beings make copies. Computers are given
commands, not permission. Only people can be given permission."
-- Brad Templeton
.
- References:
- fseek and open_memstream
- From: Dmitry Belous
- fseek and open_memstream
- Prev by Date: Re: Initialising Variables
- Next by Date: Re: fseek and open_memstream
- Previous by thread: Re: fseek and open_memstream
- Next by thread: Re: fseek and open_memstream
- Index(es):