Looking a little more, I am surprised that you don't get compiler errors.
In any case, remove the included superfluous .h header files; and especially replace:
#include <string.h>
with
#include <string>