Chinaunix首页 | 论坛 | 博客
  • 博客访问: 439116
  • 博文数量: 116
  • 博客积分: 2756
  • 博客等级: 少校
  • 技术积分: 1163
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-29 21:21
文章分类

全部博文(116)

文章存档

2018年(1)

2017年(1)

2016年(30)

2015年(41)

2014年(23)

2011年(7)

2010年(9)

2008年(4)

分类: Android平台

2016-05-18 15:19:39

首先,安装libfccp-dev。

然后,基本使用方法如下:

点击(此处)折叠或打开

  1. #include <libfccp/csv.h>

  2. #include <iostream>

  3. #include <string>

  4. int main(int argument_number, char **argument_array)
  5. {
  6.     std::string file_name = "test.csv";

  7.     io::CSVReader<2, io::trim_chars<' '>, io::double_quote_escape<',', '\"'>> o_csv_reader(file_name);

  8.     std::string col_01;
  9.     std::string col_02;

  10.     while (true)
  11.     {
  12.         if (o_csv_reader.read_row(col_01, col_02))
  13.         {
  14.             std::cout << col_01 << "\t

阅读(1004) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~