摘要: 此处http://blog.sina.com.cn/s/blog_6163bdeb0100qr2r.html 有提供一种解决办法,不过需要事先知晓csv的列数。这里补充一个 可以用来提取 csv 文件列数的 函数int GetTotalCol (FILE* fp){ char strLine[2000]; // fseek(fp,0,SEEK_SET); fgets(strLine, 2000, fp); int i=0,num=0; while(strLine[i]!='\0') { if(strLine[i]==',') //44 num++; ... 阅读全文
posted @ 2012-09-13 20:12 IamJason 阅读(590) 评论(0) 推荐(0) 编辑