Please post your code in code tags, using the '#' button.
when i compile my example program it shows the below error
Flash.cpp: In function 'void loop()':
Flash.pde:-1: error: 'dflash' was not declared in this scope
Flash.cpp: In function 'void initShield()':
Flash.pde:-1: error: 'dflash' was not declared in this scope
It would. You haven't defined anything called dflash. You probably need
DataFlash dflash;
in there.
I voted for 2, because it's bigger. I'm not sure how it helps though.