Generic data type in c

This page summarizes the projects mentioned and recommended in the original post on /r/C_Programming

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • gunslinger

    C99, header-only framework for games and multimedia applications

  • That being said, you may have your requirements satisfied with tagged unions which consists in implementing a struct with an anonymous union and label (like an enum) to keep track of what data is inside the union, this works really well when you know beforehand which data types you want to support. Another technique could be using macros, like the containers on the gunslinger framework, however I have never implemented something like this. Lastly you can always use void pointers, however you may need to be more clever to achieve it (I almost never use them).

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts