C++ code for fitting cataclysmic variable lightcurves