mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-14 10:50:13 +08:00
fix forward declarations
This commit is contained in:
@@ -18,15 +18,10 @@ using std::string;
|
||||
namespace { // keep the code local to this file by assigning them to an unnamed
|
||||
// namespace
|
||||
|
||||
/** Node object that holds key */
|
||||
struct Entry {
|
||||
explicit Entry(int key = notPresent) : key(key) {} ///< constructor
|
||||
int key; ///< key value
|
||||
};
|
||||
|
||||
// fwd declarations
|
||||
bool putProber(Entry entry, int key);
|
||||
bool searchingProber(Entry entry, int key);
|
||||
using Entry = struct Entry;
|
||||
bool putProber(const Entry& entry, int key);
|
||||
bool searchingProber(const Entry& entry, int key);
|
||||
void add(int key);
|
||||
|
||||
// Undocumented globals
|
||||
@@ -37,6 +32,12 @@ int tomb = -1;
|
||||
int size;
|
||||
bool rehashing;
|
||||
|
||||
/** Node object that holds key */
|
||||
struct Entry {
|
||||
explicit Entry(int key = notPresent) : key(key) {} ///< constructor
|
||||
int key; ///< key value
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Hash a key. Uses the STL library's `std::hash()` function.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user