Showing FPS in program

How can I show how many fps there is in my program? If possibly I want to show it in my program in a corner else in shell with printf/cout or something.
thanks.

See on my website, I’ve the thing that you want.

“Download” section
http://ibelgique.ifrance.com/Slug-Production/