这段代码 有问题吗C/C++ code//m_pointContainer存放所有点的容器for (std::vectorCPoint::iterator it
这段代码 有问题吗
- C/C++ code
//m_pointContainer存放所有点的容器 for (std::vector<CPoint>::iterator it=m_pointContainer.begin();it!=m_pointContainer.end();++it) { CPoint pt; pt = *it; index = index-index+1; strintX.Format("%d",pt.x); strintY.Format("%d",pt.y); stringIndex.Format("%d",index); ::WritePrivateProfileString("position","x",strintX,"C://Pos.ini"); ::WritePrivateProfileString("position","y",strintY,"C://Pos.ini"); }为什么Pos.ini里只有一条数据?
[解决办法]
key只有一个啊
[解决办法]
index = index-index+1;
这个永远都是1啊。。
[解决办法]
另外你的for循环中是否需要先++,
[解决办法]
index = index-index+1;
这个永远都是1啊。。
