Changed database from C to C++