MFC制作简易地图导航遇到打开保存数据问题
正在做一个简易地图导航,在道路上可以添加节点,道路和节点保存在一起,怎么编写打开和保存的BUTTON的代码CStdioFile file;
file.Open("F:\\data.txt",CFile::modeWrite|CFile::modeNoTruncate|CFile::modeCreate);
CString data;
char b[10];
itoa(m_dllb.GetCount(),b,10);
file.WriteString(b);
file.WriteString("\n");
for(roadid=0;roadid<m_dllb.GetCount();roadid++){
itoa(Road[roadid].id,b,10);
file.WriteString(b);
file.WriteString("\n");
file.WriteString(Road[roadid].roadname);
file.WriteString("\n");
/*for(nodeid=0;nodeid<Road[roadid].nodes.size();nodeid++){
char b[10],c[10];
itoa(Road[roadid].nodes[nodeid].x,b,10);
itoa(Road[roadid].nodes[nodeid].y,c,10);
CString temp;
//temp=Road[roadid].nodes[nodeid].name;
temp+=b;
temp+=",";
temp+=c;
m_points.AddString(temp);
//MessageBox("刷新节点","提示",MB_OK);
}*/
}
file.Close();这个保存的代码节点存不进去为什么