We present the KKMCee 5.00.2 Monte Carlo event generator for lepton and quark pair production for the high energy electron-positron annihilation process. It is still the most sophisticated event generator for such processes. Its entire source code is re-written in the modern C++ language. It reproduces all features of the older KKMC code in Fortran 77. However, a number of improvements in the Monte Carlo algorithm are also implemented. Most importantly, it is intended to be a starting point for the future improvements, which will be mandatory for the future high precision lepton collider projects. As in the older version, in addition to higher order QED corrections, it includes so-called O(α1.5) genuine weak corrections using a version of the classic DIZET library and polarized τ decays using TAUOLA program. Both DIZET and TAUOLA external libraries are still in Fortran 77. In addition, a HEPMC3 interface to other MC programs, like parton showers and detector simulation, replaces the older HepEvt interface. The HEPMC3 interface is also exploited in the implementation of the additional photon final state emissions in τ decays using an external PHOTOS library rewritten in C. Program summaryProgram title:KKMCee 5.00.2CPC Library link to program files:https://doi.org/10.17632/7drvvhbw92.1Licensing provisions: GPL-3.0Programming languages:C++, FORTRAN77External routines:CERN ROOT library, PHOTOS, HepMC v.3.0, TAUOLA, PHOTOS, FOAM, HEPMC3Nature of the problem: Fermion pair production is and will be used as an important data source for precise tests of the standard electroweak theory at a high luminosity future circular collider near the Z resonance and above and/or at the future linear lepton colliders of higher energies than those at LEP. The QED corrections to fermion pair production (especially τ leptons) have to be known to at least second order, including spin polarization effects, with 4-5 digit precision. The Standard Model predictions at the sub-permille precision level, taking into account multiple emission of photons for realistic experimental acceptances, can only be obtained using a Monte Carlo event generator. The realistic and precise simulation of τ lepton decays taking into account spin effects is an indispensable ingredient in the Monte Carlo event generator for the fermion pair production process.Solution method: Monte Carlo methods are used to simulate most of the two-fermion final-state processes in e+e− collisions in the presence of multiphoton initial and final state radiation. The multiphoton effects are described in the framework of coherent exclusive exponentiation (CEEX) extending/upgrading the older Yennie–Frautschi–Suura exclusive exponentiation (EEX) scheme. CEEX treats correctly to infinite order not only infrared cancellations but also QED interferences, including suppression of initial-final state interferences for narrow resonances. The matrix element according to the older YFS exponentiation is also implemented for the testing purpose. For τ leptons, the appropriate simulation of a very rich spectrum of the decays is included. Beam polarization and spin effects, both longitudinal and transverse, in tau decays are properly taken into account. Gaussian beam spread and an arbitrary spectrum of the beamstrahlung are also optionally simulated. The present version of the program is rewritten to C++ but in many respects corresponds to its FORTRAN predecessor KKMC v.4.13 [1] with later minor modifications in v. 4.32 [2].Additional comments including restrictions and unusual features: In the present version, electron (Bhabha) and t-quark final states are not included. (It is planned for a future version.) Third-order QED corrections in the leading-logarithmic approximation are included only in the auxiliary older YFS/EEX matrix element. The electroweak corrections should not be trusted above the t-quark threshold. The total cross section for light quarks for s<10 GeV (including narrow resonances) requires an improvement using experimental data. The program does not provide any handles for the beyond the Standard Model (BSM) physics, for instance in the Born Z boson couplings or in the electroweak (EW) formfactors.Running time depends on the CMS energy, final fermion type, upper phase space limit of the photon energy, and whether variable weight events or WT=1 events are generated. On a PC/Linux with a 2.2 GHz processor, producing 100k variable weight events at s=MZ takes 25 sec. of CPU time for μ-pairs and 30 sec. for τ-pairs including decays. At s=189 GeV 100k events with WT=1 costs 1200 sec. for μ-pairs and 830 sec. for τ-pairs (less hard photons).