>how do I initialize a hash file???
Hopefully the file already exists, but we're basically talking about a binary file where every record is exactly the same size. This way you can calculate an offset with the hash function.
>Also, do I still need to use an array of any sort or not with hash files?
You only need to work with a single record at a time, so no.
can i still use the hash function you gave me ?
>can i still use the hash function you gave me ?
Of course. The only real difference between a hash table and a hash file is how you access the data. The actual hashing part remains the same throughout.
I hate to keep bothering, but how do I deal with collissions now.
I have set up a while loop to go through the entire file, and I read on record at a time and hash it. how can i deal with collissions within in my while loop???
that will be the last of my questions!
>how can i deal with collissions within in my while loop???
Since you are using linear probing you don't have to make any changes, handle collisions the same way: If your hashed index is already taken, move to the next one until you find an empty index.