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.
Which is it? Your code only reads one byte. Why are you creating a
text file to store one byte? If the file isn't intended for the user
to read, why use a text file?
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...
FWIW, both Pascal strings (Str255) and FSSpecs are considered legacy
data types that should be avoided as much as possible. What you have
should work (with the exception of one issue I mention below), but
I'm curious as to what kind of data your storing in this file, as
there may be a better mechanism for managing this information.
This doesn't make sense. You haven't initialized any of the fields of
spec before using them with FSMakeFSSpec. What exactly do you expect
from using random values to create an FSSpec?
_______________________________________________
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