如何解决 采用 release 保存的 一个结构 在debug 下打不开 ,该如何解决? struct editednode
{
std::string nodename; //节点名称
std::string entityname;
std::string meshname; //模型名称
std::string materialname; //实体的材质
Vector3 position; //节点的位置
Vector3 scale; //节点的缩放因子
Quaternion orientation;
}这样的结构 ,
采用这样的 读入方法
std::ifstream infediteddat(tempath.c_str() ,std::ios::binary|std::ios::in); //打开将要读去的文件
editednode tempnode ;
infediteddat.read((char *) & tempnode,sizeof(editednode ) );怎么就读不出来呢 ? 到底什么问题? 有什么机制? 难道 debug下 跟 release 下有什么不同?
不能用read write读写文件,得依次读写每个成员。