This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int vector_test(int, char**) | |
{ | |
typedef dbstl::db_vector <double, ElementHolder<double> > dbl_vec_t; | |
DbEnv *penv = new DbEnv(DB_CXX_NO_EXCEPTIONS); // (2) | |
penv->open("dbenv", | |
flags | DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE, 0777); // (3) | |
pdb = dbstl::open_db(penv, "vector2.db", | |
DB_RECNO, DB_CREATE | dboflags, 0); // (4) | |
dbstl::register_db_env(penv); // (5) | |
dbstl::register_db(pdb); // (6) | |
dbl_vec_t v1(penv, pdb); // (7) | |
v1.push_back(32.1); | |
v1.push_back(40.5); | |
// The rest follows ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment