在“确定”按钮的响应函数里首先取出"文本框"中的数据
CStdioFile file;
file.Open("text.txt",CFile::modeWrite|CFile::typeText);
file.WriteString(st);
file.Close();在“退出”按钮的响应函数里: AfxMessageBox("是否确认退出");
CStdioFile file;
file.Open("text.txt",CFile::modeWrite|CFile::typeText);
file.WriteString(st);
file.Close();在“退出”按钮的响应函数里: AfxMessageBox("是否确认退出");
Debug Assertion Failed!
.................
Flile:filetxt.cpp
line:167For information on how yout program can cause an assertion
failure,see the the Visual C++ documentation on asserts
(Press Retry debug the application)
不过要注意,
file.Open("text.txt",CFile::modeWrite|CFile::typeText);
test.txt是相对路径.如果要指定路径,需要写绝对路径
Debug Assertion Failed!
.................
Flile:filetxt.cpp
line:167For information on how yout program can cause an assertion
failure,see the the Visual C++ documentation on asserts
(Press Retry debug the application)-------------------------------------------------------------------------------
不是我给你的代码引起的。
这个错误好象是说断言函数检查失败。看看是不是你的哪个变量值不合理