Строку в бинарный файл пишут обычно так: пишут длину строки, потом саму строку
- Код: Выделить всё
- procedure SaveString(const Value: string; Str: TStream);
 var Count: Integer;
 begin
 Count:=Length(Value);
 if Str.Write(Count, Sizeof(Integer)) < Sizeof(Integer) then
 raise Exception.Create('Ошибка записи');
 if Count > 0 then
 if Str.Write(Value[1], Count) < Count then
 raise Exception.Create('Ошибка записи');
 end;
Ну, и читают также: читают длину строки и саму строку. Надо только точно знать, что сейчас будет строка




