我的源代码:
QFile file("sys.stat");
if(file.open(IO_ReadOnly))
{
QTextStream filestream(&file);
QString string;
while (filestream.atEnd() == 0)
{
string = filestream.readLine();
}
}
file.close();
sys.stat文件的内容:
主机:172.21.2.7 检测时间: 2007/07/18 11:12:20
系统信息
读第一行时的内容为:
172.21.2.7 2007/07/18 11:12:20
跟踪程序内存的内容为:
{"172.21.2.7 2007/07/18 11:12:20??Q" len=32}
内存中没了中文字符。
请各位帮忙分析一下原因。
很急,程序就卡在这块了。谢谢了!
[ 此贴被XChinux在2008-07-18 12:02重新编辑 ]