Commit 26cfc9af939e3fa8bd6266b5561d27c1e3946e6c
1 parent
b70de0b6
Added missing include
Showing
1 changed file
with
3 additions
and
1 deletions
examples05/04-assoctabl2/assoctab.h
@@ -2,6 +2,8 @@ | @@ -2,6 +2,8 @@ | ||
2 | #define __ASSOCTAB_H__ | 2 | #define __ASSOCTAB_H__ |
3 | 3 | ||
4 | #include "vector.h" | 4 | #include "vector.h" |
5 | +#include <string.h> | ||
6 | + | ||
5 | class assocTab | 7 | class assocTab |
6 | { | 8 | { |
7 | private: | 9 | private: |
@@ -57,7 +59,7 @@ public: | @@ -57,7 +59,7 @@ public: | ||
57 | unsigned sum=0; | 59 | unsigned sum=0; |
58 | while(*s) | 60 | while(*s) |
59 | { | 61 | { |
60 | - sum=65599*sum+(unsigned char)(*s); | 62 | + sum=65599u*sum+(unsigned char)(*s); |
61 | s++; | 63 | s++; |
62 | } | 64 | } |
63 | return sum % chains; | 65 | return sum % chains; |