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 | 2 | #define __ASSOCTAB_H__ |
| 3 | 3 | |
| 4 | 4 | #include "vector.h" |
| 5 | +#include <string.h> | |
| 6 | + | |
| 5 | 7 | class assocTab |
| 6 | 8 | { |
| 7 | 9 | private: |
| ... | ... | @@ -57,7 +59,7 @@ public: |
| 57 | 59 | unsigned sum=0; |
| 58 | 60 | while(*s) |
| 59 | 61 | { |
| 60 | - sum=65599*sum+(unsigned char)(*s); | |
| 62 | + sum=65599u*sum+(unsigned char)(*s); | |
| 61 | 63 | s++; |
| 62 | 64 | } |
| 63 | 65 | return sum % chains; | ... | ... |