如何在C ++中读取\写入cvs文件? [英] How to read\write cvs file in C++ ?
本文介绍了如何在C ++中读取\写入cvs文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想对cvs文件执行读写操作.
不使用任何第三方库或工具怎么办?
I want to perform read and write operation on cvs files.
How can i do it without using any third party lib or tool ?
推荐答案
通过使用功能fgets
^ ]并将每一行解析为std::list<std::string>
,即按您的意愿:第三方库.
—SA
By using the functionfgets
http://pubs.opengroup.org/onlinepubs/009695399/functions/fgets.html[^] and parsing each line intostd::list<std::string>
, that is, literally as you wanted it: without third-party libraries.
—SA
这篇关于如何在C ++中读取\写入cvs文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文