Reprap Slicing program in C++