FROM : Severin Kurpiers
DATE : Mon Dec 13 18:58:37 2004
Hi April,
it would be better to use [[panel filename] fileSystemRepresentation]
instead of [[panel filename] cString], but we can just assume that
[[panel filename]cString] is delivering you the correct path. Try to
use while((chr = getc(fptr)) != EOF) (note additional brackets), is the
result correct now?
Bye,
Severin Kurpiers
Verek Ltd.
On 13. Dez 2004, at 16:53, April Gendill wrote:
> Below is the code I'm trying to use to read a binary file. I'm getting
> an empty string though.. Can any one shed some light on this?
>
>
>
> FILE * fptr;
> fptr = fopen([[panel filename]cString],"rb");
> char chr;
> NSMutableString * fd =[[NSMutableString alloc]init];
>
> while(chr =getc(fptr) != EOF){
> [fd appendString:[NSString stringWithFormat:@"%c",chr]];
> }
DATE : Mon Dec 13 18:58:37 2004
Hi April,
it would be better to use [[panel filename] fileSystemRepresentation]
instead of [[panel filename] cString], but we can just assume that
[[panel filename]cString] is delivering you the correct path. Try to
use while((chr = getc(fptr)) != EOF) (note additional brackets), is the
result correct now?
Bye,
Severin Kurpiers
Verek Ltd.
On 13. Dez 2004, at 16:53, April Gendill wrote:
> Below is the code I'm trying to use to read a binary file. I'm getting
> an empty string though.. Can any one shed some light on this?
>
>
>
> FILE * fptr;
> fptr = fopen([[panel filename]cString],"rb");
> char chr;
> NSMutableString * fd =[[NSMutableString alloc]init];
>
> while(chr =getc(fptr) != EOF){
> [fd appendString:[NSString stringWithFormat:@"%c",chr]];
> }
| Related mails | Author | Date |
|---|---|---|
| April Gendill | Dec 13, 16:51 | |
| glenn andreas | Dec 13, 17:12 | |
| Marcel Weiher | Dec 13, 17:19 | |
| Henry McGilton | Dec 13, 18:14 | |
| Severin Kurpiers | Dec 13, 18:58 |






Cocoa mail archive

