File: hellohash.cc

package info (click to toggle)
libcuckoo 0.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,036 kB
  • sloc: cpp: 16,538; ansic: 72; python: 34; sh: 15; makefile: 9
file content (22 lines) | stat: -rw-r--r-- 428 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
#include <string>

#include <libcuckoo/cuckoohash_map.hh>

int main() {
  libcuckoo::cuckoohash_map<int, std::string> Table;

  for (int i = 0; i < 100; i++) {
    Table.insert(i, "hello");
  }

  for (int i = 0; i < 101; i++) {
    std::string out;

    if (Table.find(i, out)) {
      std::cout << i << "  " << out << std::endl;
    } else {
      std::cout << i << "  NOT FOUND" << std::endl;
    }
  }
}