在VS2005中集成QT的环境
sorry 说错了,是向量push_back,QString的问题
child.toElement().attribute("current_height")这个是获得xml文件中的一个字符串
v_string.push_back(child.toElement().attribute("current_height"))这个编译通过,运行有堆错误
下面则可以运行正常。
v_string.push_back(*(new QString(child.toElement().attribute("current_height"))));
而且最奇怪的是xml我是单独在命令行里面调试编写的,当时即使用v_string.push_back(child.toElement().attribute("current_height"))也没有问题
该方法移植奥另一个程序就出现上述问题。
[ 此帖被destiny在2010-01-22 18:34重新编辑 ]