Archived

This topic is now archived and is closed to further replies.

carbon14

iostream filename

Recommended Posts

please tell me what i am doing wrong i am trying to creat a unique file name SYSTEMTIME time; GetLocalTime(&time); CString filename; filename.Format("%s-%s-%s-%02d_%02d_%02d_%02d_%02d_%02d" EXT, logdir, Task, Monkey, time.wYear %100, time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond); i get this err: C:\paymon\OhBehave-2.2.9\ohdisplay\movies\rdots2dist.cpp(79) : error C2146: syntax error : missing '')'' before identifier ''EXT'' C:\paymon\OhBehave-2.2.9\ohdisplay\movies\rdots2dist.cpp(88) : error C2059: syntax error : '')''

Share this post


Link to post
Share on other sites
I can''t help unless you post something about that EXT, although perhaps this could help: possibly that''s supposed to be TEXT ( "..." ), if so, it should look more like:

filename.Format(TEXT"%s-%s-%s-%02d_%02d_%02d_%02d_%02d_%02d",
logdir,
Task,
Monkey,
time.wYear %100,
time.wMonth,
time.wDay,
time.wHour,
time.wMinute,
time.wSecond);

Although still that may not fix it...

Share this post


Link to post
Share on other sites