read data from an .txt file
read data from an .txt file
- Subject: read data from an .txt file
- From: Jürgen Keser <email@hidden>
- Date: 27 Nov 2006 15:52:58 +0100
Hi,
I create an .txt file that contains some data. Now I want to store all the data
from the .txt file in an char or an Str255. Here is a snippet of the code I use.
Is this the right way to get the data of the .txt file? How must I go on?
Or is it better to do that with fopen/fread...
FSSpec spec;
SInt8 tt = true;
short fileRefNum;
err = FSMakeFSSpec(spec.vRefNum,spec.parID,spec.name,&spec);
err = FSpOpenDF(&spec,tt,&fileRefNum);
long count = 1;
char ch[255];
if(!err){
err = FSRead(fileRefNum, &count, &ch);
if(!err){
FSClose(fileRefNum);
}
}
Thanks for any help.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden