Skip to the content.

CSV2HPP Converter

This command-line utility converts the content of a .CSV file (comma-separated values) into a header file for C/C++ software projects. Afterward, #include the resulting header file and immediately start to develop on a structured, well-formed dataset (and skip error-prone steps like file delivering, loading, parsing, converting, and checking).

▶️ Usage

  1. Export or download your database in CSV format, e.g. to: bucket_list.csv
  2. Open the CSV file in a text editor and add datatype hints to the header line, e.g.: Location (std::string), Latitude (double), Longitude (double)
  3. Execute in a terminal window: csv2hpp bucket_list.csv POI > bucket_list.hpp.
  4. Copy the generated header file into your project and include it (#include “bucket_list.hpp”).

💡 Hints

🤝 Contributing

This open source project is licensed under the CC0-1.0 license. All trademarks are the property of their respective owners.