--- Quote Start ---
Mucahid - You need to run this code in modelsim - not quartus. the simulator in quartus (and is only available in older versions of quartus, it was dropped in V10) is very basic and requires that you synthesise the code befoer you can simulate. Because the code is unsynthesisable there is the problem. You need to run it in modelsim.
Secondly - there is no type "hex_image_file" declared - hence the error. You need to delcare the type yourself.
thirdly - this file is using very old syntax (VHDL 1987). I suggest using VHDL 93. VHDL is very good at reading text files but not good at reading anything else.
I suggest reading a textio tutorial online
--- Quote End ---
Thanks for your advices. I will do as you said, i hope i manage it. :)