简体   繁体   English

使用StrTk String Toolkit Library编写CSV的示例

[英]Example of writing CSV using StrTk String Toolkit Library

I just started to learn the String Toolkit Library . 我刚刚开始学习String Toolkit库 I've read the CodeProject article, but it seemed focused on parsing and tokenization. 我已经阅读了CodeProject文章,但它似乎专注于解析和标记化。 Can someone point me to an example of using it to serialize a struct array to CSV file? 有人能指出我使用它将struct数组序列化为CSV文件的例子吗? For example, given: 例如,给定:

typedef struct {
    int x;
    int y;
} Point;

I'd like to write an array of Points to a csv file, one point per row. 我想将一个Points数组写入一个csv文件,每行一个点。 The int to string conversion should be fast. int到string的转换应该很快。

I think that best example is String Toolkit Library Source Code and Examples , especially file "strtk_serializer_example.cpp". 我认为最好的例子是String Toolkit库源代码和示例 ,尤其是文件“strtk_serializer_example.cpp”。 This example describes many scenarios of structure serialization. 此示例描述了许多结构序列化的方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM