Added some c_str() and stdlib.h in db.cpp to be able to compile in Linux