Hi,i am a c++ beginer(*not C++.net*).i am using the visual studio 2003 comand prompt compiler.
I wan't to write program that prints the current date and time.
Can some one tell me the code/statement that would do print the date and time??
Hi,i am a c++ beginer(*not C++.net*).i am using the visual studio 2003 comand prompt compiler.
I wan't to write program that prints the current date and time.
Can some one tell me the code/statement that would do print the date and time??
Check this page out: http://www.cplusplus.com/reference/clibrary/ctime/
That should give you the list of functions necessary to do all kinds of things with date and time. Just remember to include the <ctime> header before you use any of those functions or data types.
1. read FAQ http://faq.cprogramming.com/cgi-bin/...&id=1043284392
2. search forum with "date time" key words
3. read the answers to the similar questions
4. write your own code
5. if you'll have problems - post your code and ask concrete question
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler