create cpp.hex file

when i compile my code i am getting ino.hex file but i want to generate cpp.hex file...please help in this regard asap

there is a new way to do this added in Arduino since IDE 1.6.5:

  • Sketch > Export Compiled Binary
  • If you are doing this with an example then you will be prompted to save the sketch in another location.
  • Wait until the sketch has finished compiling.
  • Sketch > Show Sketch Folder
  • The .hex file will be in the sketch folder

Can't you re-name it to cpp.hex?

sir,by doing this i am able to get ino.hex file but i want cpp.hex file for my proteus simulation

The only difference in the .ino.hex and .cpp.hex is the name - the contents is the same, they just changed how they name them in 1.6.6 and later (when they swithed to Arduino Builder). So, use the .ino.hex - if the application won't accept that because the extension is different, rename it.