I have this code. I would like to put argv[1] as prefix to fileName. How do I do that?
int _tmain(int argc, char** argv)
{
...
_stprintf(fileName, _T("%04d-%02d-%02d-%02d-%02d-%02d-%03d.jpeg"), lt.wYear, lt.wMonth, lt.wDay, lt.wHour, lt.wMinute, lt.wSecond, lt.wMilliseconds);
That will do what you want, but since you’re using C++ you would be best to use a stringstream instead.
You can then access the string with
ss.str(). You can also use the same stream format modifiers you would use with any output stream.