在VS2003和VC6.0中TRACE的区别是什么呢?
VS2003下代码:
TRACE(traceAppMsg, 0, _T( "MRU: open file (%d) '%s '.\n "), (nIndex) + 1,
(LPCTSTR)(*m_pRecentFileList)[nIndex]);
放到VC6下后错误提示:
error C2664: 'AfxTrace ' : cannot convert parameter 1 from 'enum AfxTraceFlags ' to 'const char * '
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
是说第一个参数有问题吧?那在VC6下该怎么用呢?
[解决办法]
http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/vsdebug/html/_core_the_trace_macro.asp