Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

each of your sprintf calls overwrites your previous attempt, it does not work like strcat you've got to put it all into one call:

sprintf(file,"%s%d%d%d_%d%d%d.pgm\n","D:/Projects/vs2010/text11/" tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);