fork download
  1.  
  2. DbEnv* penv = nullptr;
  3. Db* db = nullptr;
  4. db_set<unsigned long long, ElementHolder<unsigned long long>> test_set;
  5.  
  6. int main(int argc, char* argv[]) {
  7. penv = open_env(...);
  8. open_db(penv, "test.db", ....);
  9. test_set = {db, penv};
  10.  
  11. call_other_functions(....);
  12. call_other_functions(....);
  13.  
  14. test_set = {};
  15. close_db(penv, db);
  16. close_env(penv);
  17.  
  18. return 0;
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:1: error: ‘DbEnv’ does not name a type
 DbEnv* penv = nullptr;
 ^~~~~
prog.cpp:3:1: error: ‘Db’ does not name a type
 Db* db = nullptr;
 ^~
prog.cpp:4:1: error: ‘db_set’ does not name a type
 db_set<unsigned long long, ElementHolder<unsigned long long>> test_set;
 ^~~~~~
prog.cpp: In function ‘int main(int, char**)’:
prog.cpp:7:4: error: ‘penv’ was not declared in this scope
    penv = open_env(...);
    ^~~~
prog.cpp:7:20: error: expected primary-expression before ‘...’ token
    penv = open_env(...);
                    ^~~
prog.cpp:7:11: error: ‘open_env’ was not declared in this scope
    penv = open_env(...);
           ^~~~~~~~
prog.cpp:8:29: error: expected primary-expression before ‘...’ token
    open_db(penv, "test.db", ....);
                             ^~~
prog.cpp:8:4: error: ‘open_db’ was not declared in this scope
    open_db(penv, "test.db", ....);
    ^~~~~~~
prog.cpp:9:4: error: ‘test_set’ was not declared in this scope
    test_set = {db, penv};
    ^~~~~~~~
prog.cpp:9:16: error: ‘db’ was not declared in this scope
    test_set = {db, penv};
                ^~
prog.cpp:11:23: error: expected primary-expression before ‘...’ token
  call_other_functions(....);
                       ^~~
prog.cpp:11:2: error: ‘call_other_functions’ was not declared in this scope
  call_other_functions(....);
  ^~~~~~~~~~~~~~~~~~~~
prog.cpp:12:23: error: expected primary-expression before ‘...’ token
  call_other_functions(....);
                       ^~~
prog.cpp:15:2: error: ‘close_db’ was not declared in this scope
  close_db(penv, db);
  ^~~~~~~~
prog.cpp:16:2: error: ‘close_env’ was not declared in this scope
  close_env(penv);
  ^~~~~~~~~
stdout
Standard output is empty