C++读取CSV表格 (三)

2014-11-24 03:18:22 · 作者: · 浏览: 3
pTable[skillTemp.GetID()] = skillTemp;
}
}测试代码:


[cpp]
CppCSV cs("skill.csv");
map> stringMap = cs.GetCSVMap();

map>::iterator iter = stringMap.begin();
for (; iter != stringMap.end(); ++iter)
{
map strmap = iter->second;
map::iterator it = strmap.begin();
for (; it != strmap.end(); ++it)
{
cout<second<<" ";
}
cout< }

CppCSV cs("skill.csv");
map> stringMap = cs.GetCSVMap();

map>::iterator iter = stringMap.begin();
for (; iter != stringMap.end(); ++iter)
{
map strmap = iter->second;
map::iterator it = strmap.begin();
for (; it != strmap.end(); ++it)
{
cout<second<<" ";
}
cout< }

由于从文件中读取出来的内容都是存储在string对象中,如果文件呢存储的是一定意义的数据,需要进行转换了。