We use this Rust library to do individual and batch inserts:
https://docs.rs/clickhouse/latest/clickhouse/The error messages for batch inserts are TERRIBLE, but once it’s working it just hums along beautifully.
I’d be surprised if there isn’t a similar library for C++, as I believe clickhouse itself is written in C++