[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Getting a string stream
From: |
Aurelien |
Subject: |
Getting a string stream |
Date: |
Sun, 23 Sep 2001 21:03:16 +0200 |
Hi again,
Sorry, this is more a C question, but it could turn out that objective-c
has more adequate an answer to my problem...
I have an NSString that I'd like to pass to a function as a stream. This
is how I'm trying to implement this:
#include <stdio.h>
[...]
FILE *_stream;
NSString *streamStr = [[NSString alloc] initWithString: @"..."];
const char *buffer = [streamStr UTF8String];
_stream = fmemopen ( buffer, strlen (buffer), "r" );
[...]
the compiler complains about an "undefined reference to 'fmemopen'"
Seems that my glibc version doesn't support fmemopen. Is something like
this possible ? fmemopen is such a basic facility...
How can I know the version of my glibc ? Is there another well-known
function with the same functionality ?
Finally, are there objc objects to handle streams ?
Aurélien
- Getting a string stream,
Aurelien <=