start coding the deamon in c++