create a file with current system date

hello!
can someone provide me the code to create a file with the system date as the name of the file example "1-11-2015.txt"
also how do i write data into the created file?
There is an example @ http://www.cplusplus.com/reference/ctime/localtime/ and all you have to do is change line 12 to use sprintf. Then you can incorporate parts of http://www.cplusplus.com/reference/fstream/ofstream/open/ changing line 9 to whatever it is you need to write to the file.
Topic archived. No new replies allowed.