Make C++ compatible with older versions

Ensure that for C++ code the public members come before private members.