I have never used ctime but I would like to able to first of all take the date as a string and use it as a pathname. For example in my program I open all files in the following directory on todays date:
"c:\\test folder\\2013\\08-11"
I want ctime to provide the date for me and convert it to a string called "date" so in the case above the string first returns the year, the month and then the day in the following format.
Thanks for the link Andy! I can modify the example code to display the information I need but I am unsure of how I can actually create a variable string that contains the %y %d %m that I need rather than just displaying them via
After you call strftime, buffer is contains the string with the format specifiers expanded to their actual values, so you can then construct a string from the contents of buffer.