regading atmega8-p

Hello everyone ,I am stuck in using atmega8. I am using arduino uno ,I do have a universal programmer , I use arduino uno to program atmega328 ,now there are some certain application where it is required to use atmega8 ,after watching lots of video tutorial i am not able to make it there are certain problems which occurs in doing so .What i am doing is i am making a sketch in arduino IDE and compiling and then i am extracting its .hex file from the code itself and uploading with the use of universal programmer.

rohit1121:
i am not able to make it there are certain problems which occurs in doing so .

That's extremely vague. You need to provide exact details of what you're doing and what problems you're encountering.

rohit1121:
What i am doing is i am making a sketch in arduino IDE and compiling and then i am extracting its .hex file from the code itself

Is the .hex file you're uploading compiled for ATmega8 or for ATmega328?

compiled for ATmega8 ?

You'll want board type "NG or older" and then set the "Processor" to Atmega8.