Convert fractalb.c to C++