making the current calender

Hi!
I have a problem. I want to write a program that gives me the current calender for example like this:
June 2009
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
and I shouldn't use windows.h
can someone help me?


check out <time.h> header http://www.cplusplus.com/reference/ctime to find the date of today especially here:http://www.cplusplus.com/reference/ctime/localtime
Some additional links to help with the tricky parts.
http://www.cplusplus.com/forum/general/113651/#msg620789
http://www.cplusplus.com/forum/general/120127/#msg653694

(The tricky parts are: leap year --> days per month [February], and finding the day of the week for the first day of the month.)
Topic archived. No new replies allowed.