A Satyendra and MB Vinay the credits go to them. The code given here is a compressed file. Uncompress it using some software into a folder. Copy that folder. Then in eclipse create a C++ project and paste this folder inside that project. Set the project properties and off you go.
You should get this snapshot:
Here is the source.
You should get this snapshot:
Here is the source.