路径问题
请试试改改路径AssignFile(F,'c:\test.txt');

解决方案 »

  1.   

    我在使用query的时候也出现过类似的情况,我的解决方法.
    在使用时先把出问题的那个窗体free掉,在重新用create,
    就是form1.free;
    再把project中的form1的创建代码拷贝过来就可以了.(只有一行代码)
      

  2.   

    如果程序在同一个目录下这样吧:
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      AssignFile(F,ExtractFilePath(Application.ExecName)+'\test.txt');
       {Assigns the Filename}
      if FileExist(ExtractFilePath(Application.ExecName)+'\test.txt') then
        Reset(F)
      else
        Rewrite(F);
      Append(F); {Opens the file for editing}
      Writeln(F,'You have written text into a .txt file');
      Closefile(F); {Closes file F}
    end;
      

  3.   

    可能是sunny518(灵犀) 所说的路径问题