I'm not necessarily urging making use of any particular features of C++. Just start small: use a C++ compiler and C++ file extensions. (There is an unfortunate lack for standardization of extensions for C++ files. Gcc uses .cc - which seems as good as anything else.)
I do suggest when possible using std::string rather than C strings. (There is pretty easy and convenient inter-operability between them.) Personal history/anecdote: In an old life, working for Cygnus, I wrote a lot of C++ and was active in the C++ community. Then for many years I basically wrote no C++ and very little C. It was mostly Java, and Scheme. I started exploring using JavaScript to implement ideas for "next-generation" iterminals using JavaScript, This became DomTerm. In 2017 I added a C-based backend to DomTerm, based on an existing C application (ttyd) and a C networking library (libwebsockets). That worked pretty well, but in 2020 I converted the backend to C++. This has been a gradual conversion: Some structs have become classes, and I've converted some functions to methods (member functions). I switched to using a C++ library for JSON. I use templates for a lookup table that is used for 3 different value types. As I change a section of code, I may replace C strings with std::string. And so on. It still looks more like C than C++ in many places. There is no inheritance and no virtual methods. (I still use a table containing function pointers in place of virtual methods.) If I had started with C++, or if I were more fluent in C++ than I am now, it would look different. But the current hybrid is fine. -- --Per Bothner p...@bothner.com http://per.bothner.com/