mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-02 02:02:23 +08:00
fix: initialise key to avoid undefined behaviour (#2984)
This commit is contained in:
@@ -98,7 +98,7 @@ int hash_search(int key, int* counter) { // Hash lookup function
|
||||
/** main function */
|
||||
int main() {
|
||||
link p;
|
||||
int key, index, i, counter; // Key is the value to be found
|
||||
int key = 0, index, i, counter; // Key is the value to be found
|
||||
index = 0;
|
||||
|
||||
// You can write the input mode here
|
||||
|
||||
Reference in New Issue
Block a user